|Perl: the Markov chain saw|
getting SMTP failure codesby e5z8652 (Novice)
|on Feb 04, 2010 at 23:10 UTC||Need Help??|
e5z8652 has asked for the
wisdom of the Perl Monks concerning the following question:
This is hopefully a simple one, where I am just missing a clue in the docs.
What I want is a simple script that tells me if an e-mail sent with Net::SMTP succeeds, or if it does not, why it does not.
In the example below I have a short script that sends mail, and tells me which addresses were successful. What I would like is to also list which ones failed -- hopefully with a failure code as well.
Here's the script:
When I run this the print statement does print out email@example.com as I expect. And I can see how the addresses succeed or fail with the debug output:
What I would like is to get bad_address and the 550 user unknown error into a form where I can print it. (This will eventually end up in a cgi script.)
It's got to be something simple that I am missing. Any clues?