email problem is a smtp problem

Rick Eicher II rick at pbol.net
Wed Mar 6 07:30:42 PST 2002


I have the following script I am playing with.


#####################################################
#!perl
use strict;

use Mail::Internet;
use Mail::Header;
$ENV{SMTPHOSTS} = 'zeppelin.texol.net';

my ($header, $body, $mail);

# create headers
$header = new Mail::Header;
$header->add('To', 'Rick Eicher II <rick at pbol.net>');
$header->add('From', 'Rick Eicher II<rick at pbol.net>');
$header->add('Subject', 'Mail::Test');

# create body
$body = 'This is a test, ignore';

# create mail object
$mail = new Mail::Internet(Header => $header, Body => \[$body]);

# send it
$mail->smtpsend or die;
################################################################

When I run this short script I get this:

[root at zeppelin root]# perl email
Can't locate object method "new" via package "Net::SMTP" (perhaps you forgot
to load "Net::SMTP"?) at blib/lib/Mail/Internet.pm (autosplit into
blib/lib/auto/Mail/Internet/smtpsend.al) line 588.
        ...propagated at email line 23.

Trying to do a install of Net::SMTP with cpan shows that it is up to date. I
downloaded and installed libnet-1.10 & MailTools-1.43.

I have another script that only uses Net::SMTP to send email and it works
great.

I believe this is what is why freeside is not sending email. Any ideas?

Thanks,
Rick





More information about the freeside-devel mailing list