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:[EMAIL PROTECTED]] 
Sent: 28 November 2002 19:51
To: [EMAIL PROTECTED]
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('[EMAIL PROTECTED]', 'Test email', 'This is a test', '',
'[EMAIL PROTECTED]');

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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to