I use the following code to display an error message if there are problems while sending messages through my SMTP server:
if (PEAR::isError($mail)) {
$errorMessage = $mail->getMessage();
print ("<p>$errorMessage</p>");
}
Today I put a bogus address on my domain to see what would happen. I used xyz@mydomain.com. Here is the error I got:
Failed to add recipient: xyz@mydomain.com [SMTP: Invalid response code received from server (code: 550, response: No Such User Here")]
[FONT=arial, sans serif][COLOR=#000000]I tried sending the same test message to a bogus account on another domain. I tried using xyz24601@verizon.com and the message actually went out successfully and later bounced about 5 minutes later. So why does the “No Such User Here” message only work on my own domain? If I can figure out how to do this for other domains, then I can write some code that will suspend a user’s account that is generating send errors on the fly.
Thanks!
[/COLOR][/FONT]