http://www.perlmonks.org?node_id=162282


in reply to Sending SMTP mail on other than port 25

I usually don't work with NET::SMTP, but rather send mail via sendmail (of course UNIX only solution) :
open(MAIL, "| /usr/sbin/sendmail -t") or die $!; print MAIL "From: xxx@xxx.xxx\nTo: qwe@aaa.com\nSubject: your subjec +t\n\nBody here";

This is generally much faster than NET::SMTP. And will work magically with port number etc ;)

But of course this will work only locally