Obviously you failed to connect to the server in those bad cases.
It is always a better practice to check return code on eah step. You cannot expect that the connection works all the time, but you should expect your code to handle exceptional situations.
BTW, better specify timeout when you create SMTP:
$smtp = Net::SMTP->new('mailhost', Timeout => 60);
In reply to Re: Net::SMTP error
by pg
in thread Net::SMTP error
by K_M_McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |