Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Undefined value error

by toolic (Bishop)
on Feb 21, 2018 at 18:25 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209685]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found