Enter Net::SMTP::TLS.
use Net::SMTP::TLS;
my $mailer = new Net::SMTP::TLS(
'smtp.gmail.com',
Hello => 'gmail.com',
Port => 587,
User => 'tracelogger@gmail.com',
Password=> 'pwd',
Timeout => 10,
Debug => 1,
);
$mailer->mail('tracelogger@gmail.com');
$mailer->to('anybody@world.com');
$mailer->data;
$mailer->datasend("To: anybody\@world.com\n");
$mailer->datasend("\n");
$mailer->datasend("Sent thru TLS!");
$mailer->dataend;
$mailer->quit;
No comments:
Post a Comment