http://www.perlmonks.org?node_id=288939


in reply to Sendmail to non-working email address

I tried the eval statement and got the same result. If i send a message to an address that is not accepting mail, my script crashes and the user sees Internal Server Error on their screen. If i can prevent this from happening, my problem is solved.

My message is generated from my server perl.to and sent to the address bad@perl.to. My catch-all's are OFF and only mail sent to specific users specified in my virtusertable will be accepted. I need a perl script to attempt to send this message and:

  1. Not crash the perl cgi.
  2. give me an error message i can translate

If i can only get number one i can live with it. Thanks for reading and thanks for all the advice. I hope this post streamlines my question a little bit.

jtrue