PDA

View Full Version : Getting Perl's Net::SMTP to work



gregory
01-31-2007, 08:25 AM
Hi,

I'm trying to write CGI scripts in Perl that use Net::SMTP to send e-mail. But no matter what I try, I'm unable to create an SMTP object. This line fails every time:

my $smtp = Net::SMTP->new('mail.my.domain');

where I've substituted my real domain name, of course.

I imagine it might have something to do with authentication, but Net::SMTP requires you to create an SMTP object first, and then authenticate. I never get the chance, since the object never gets created.

Thanks for any advice.
Gregory

sergiosan
12-24-2007, 07:51 PM
Hi,

I'm trying to write CGI scripts in Perl that use Net::SMTP to send e-mail. But no matter what I try, I'm unable to create an SMTP object. This line fails every time:

my $smtp = Net::SMTP->new('mail.my.domain');

where I've substituted my real domain name, of course.

I imagine it might have something to do with authentication, but Net::SMTP requires you to create an SMTP object first, and then authenticate. I never get the chance, since the object never gets created.

Thanks for any advice.
Gregory


Same problem here ! Has anybody used this module ?

Thanks, Sergio