php-windows Digest 19 Apr 2010 19:22:18 -0000 Issue 3791
Topics (messages 30035 through 30035):
Behavior of mail() function
30035 by: Lewis Kapell
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Running PHP version 5.3.1, I find that if my script tries to send an
email message to an address in the local domain, and the address is
invalid, mail() throws an error:
mail(): SMTP server response: 550 5.1.1 <sam...@setonhome.org>:
Recipient address rejected: User unknown in local recipient table
Is there a way I can configure PHP so that mail() would return false in
this case, rather than throwing an error which causes the script to die?
Our mail server is a Linux server running Postfix, if that matters.
Thank you
Lewis Kapell
--- End Message ---