Behavior of mail() function

From: Date: Mon, 19 Apr 2010 19:22:08 +0000
Subject: Behavior of mail() function
Groups: php.windows 
Request: Send a blank email to php-windows+get-30035@lists.php.net to get a copy of this 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 <SAMPLE@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

« previous php.windows (#30035) next »