I need to be alerted when an email sent using PHP Send is bounced back.
I've seen the odd reference to:
Errors-To and X-Errors-To
I haven't seen either of these documented anywhere, but I've tried using them as shown in the script below. However, it doesn't bounce back.
The problem could be in my script and/or with the hosting company. Any suggestions (including where to find documentation on Send headers) would be very much appreciated.
Thanks
Mark
Here's my test script:
<?php
echo "Testing bounce-back destination!";
$message = "Where have I gone?";
$to = "nowhereinparticular@hopethisisnotasite.com"; //invalid I hope
$sender = "sender@mysite.com";
$replyto = "replyto@mysite.com";
$errorsto = "errorsto@mysite.com";
$xerrorsto = "xerrorsto@mysite.com";
$sendr = "sendr@mysite.com";
$subject = "Bounce-back Destination";
mail($to, $subject, $message, "From: $sender\nReply-To: $replyto\nErrors-To: $errorsto\nX-Errors-To: $xerrorsto\nSender: $sendr");
?>