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

Re^3: Error message not showing up from Net::SMTP

by menolly (Hermit)
on Sep 05, 2007 at 17:53 UTC ( [id://637226] : note . print w/replies, xml ) Need Help??


in reply to Re^2: Error message not showing up from Net::SMTP
in thread Error message not showing up from Net::SMTP

Replace
print "ERROR: Could not authenticate user $user_id\n$!\n";
with
print "ERROR: Could not authenticate user $user_id\n$: ".$mail->messa +ge."\n";
or equivalent.

Replies are listed 'Best First'.
Re^4: Error message not showing up from Net::SMTP
by sg (Pilgrim) on Sep 05, 2007 at 20:12 UTC
    Thanks for the details. Augmenting the print statement with
    $mail->code,':',$mail->message,"\n";
    does indeed display the desired error message.