RE: [PHP] Detecting email bounces sent by the mail function?

From: Date: Thu, 28 Nov 2002 20:31:33 +0000
Subject: RE: [PHP] Detecting email bounces sent by the mail function?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126437@lists.php.net to get a copy of this message
What would php run as on a cobalt raq4 so I don't get the x header warning Best regards -----Original Message----- From: Michael Sims [mailto:mhsims@midsouth.rr.com] Sent: 28 November 2002 19:51 To: php-general@lists.php.net Cc: Ade Smith Subject: Re: [PHP] Detecting email bounces sent by the mail function? On Thu, 28 Nov 2002 17:54:46 -0000, you wrote: >Hello > >Is it possible to detect with PHP whether an email sent using the PHP >'mail' function has bounced back or has not been delivered? Hi, If you're using PHP on a unix/linux with sendmail you can set the envelope sender via the 5th parameter to the mail function, additional_parameters. Normally the envelope sender is the username that your web server process runs under (usually "nobody" if you're using Apache), but you can set it to either your email address or an email address you have setup specifically to catch bounces. Example: mail('user@example.com', 'Test email', 'This is a test', '', '-fspamcatcher@example.com'); Most MTA in existence will route DSNs to the envelope sender, not the From: header. Note that sendmail will add an X-Warning header if the user your web server runs as isn't considered a sendmail "trusted user". The quickest way to fix this (on Redhat machines anyway) is to put the username in /etc/mail/trusted-users. Other systems and sendmail installations may differ, so YMMV. HTH... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#126437) next »