Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 perusing the Monastery: (7)
As of 2020-10-20 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (209 votes). Check out past polls.

    Notices?