Hi guys,
I'm trying to write an emailer, but I can't manage to construct the object properly. Here's what I've got:
#!/usr/local/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
print $smtp->domain,"\n";
$ perl mailer.txt
Can't call method "domain" on an undefined value at mailer.txt line 6.
I thought at first that I didn't have the Net::SMTP library, so I tried use Net::SMTP222; which broke, since Net::SMTP doesn't break I assume I have the file in the right place, its here:
/usr/lib/perl5/5.8/Net/SMTP.pm
Thanks
Patrick