Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Trapping server responses with Net::SMTP

by rhesa (Vicar)
on Oct 21, 2008 at 21:11 UTC ( #718593=note: print w/replies, xml ) Need Help??


in reply to Trapping server responses with Net::SMTP

instead of
if ( $smtp->status() =~ /^[45]$/ ) {
you could use
if ( ! $smtp->ok ) {

Replies are listed 'Best First'.
Re^2: Trapping server responses with Net::SMTP
by yaelc (Novice) on Feb 04, 2009 at 12:22 UTC
    which status value indicates success? which indicate failure (other than 4/5)? I tried $smtp->ok and it did not seem to accurately reflect success/failure.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2023-03-31 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (76 votes). Check out past polls.

    Notices?