Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Undefined value error

by toolic (Bishop)
on Feb 21, 2018 at 18:25 UTC ( #1209685=note: print w/replies, xml ) Need Help??


in reply to Undefined value error

I suspect the call to new returns an undefined value because it fails. The Net::SMTP docs state:
On failure undef will be returned and $@ will contain the reason for the failure.

You can try to get more information by showing $@:

$smtp = Net::SMTP->new("$servername", Debug => 1); print "$@\n";

Is $servername a valid remote host?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209685]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-01-26 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?