Re: [PHP] Detecting email bounces sent by the mail function?
scott wrote: What would php run as on a cobalt raq4 so I don't get the x header warning Best regards As php is a web application, it is the webserver sending emails. Apache runs as user httpd on the raq on which I have an account. Get it to send you an email so that you can check. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
To the best of my knowledge, there is no way to do this with the mail function. However, I check for bounces using Perl and a cron. I don't see why you couldn't use php to do the same thing though. Ade Smith 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? I currently all ready check the email address using the 'ereg' function before the mail function is called, but this only checks the format is valid beforehand. Ade -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Detecting email bounces sent by the mail function?
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? I currently all ready check the email address using the 'ereg' function before the mail function is called, but this only checks the format is valid beforehand. Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
Hello Ade, Is it possible to detect with PHP whether an email sent using the PHP 'mail' function has bounced back or has not been delivered? I currently all ready check the email address using the 'ereg' function before the mail function is called, but this only checks the format is valid beforehand. Yes, and No! If you use the ReturnPath header SOME/most email servers will bounce msgs that they can't deliver to an actual mailbox back to you (others drop such msgs onto an Admin somewhere, lose them in the ether (the msgs not the Admins...) etc, etc). Accordingly, use a distinct address for this/email filing rules. Opt-in email schemes which send a welcome/confirm email to new customers do so for this reason - the only way to verify an email address is to use it (and get some feedback from the addressee). Of course, once you have 'located' a new user, you still have to cope with those who close email accounts without advising you... It's a wonderful world! =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
Added to this: you won't receive the immediately, so you are not able to tell the user that sending the mail has failed. DL Neil wrote: Hello Ade, Is it possible to detect with PHP whether an email sent using the PHP 'mail' function has bounced back or has not been delivered? I currently all ready check the email address using the 'ereg' function before the mail function is called, but this only checks the format is valid beforehand. Yes, and No! If you use the ReturnPath header SOME/most email servers will bounce msgs that they can't deliver to an actual mailbox back to you (others drop such msgs onto an Admin somewhere, lose them in the ether (the msgs not the Admins...) etc, etc). Accordingly, use a distinct address for this/email filing rules. Opt-in email schemes which send a welcome/confirm email to new customers do so for this reason - the only way to verify an email address is to use it (and get some feedback from the addressee). Of course, once you have 'located' a new user, you still have to cope with those who close email accounts without advising you... It's a wonderful world! =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
On Thu, 28 Nov 2002 17:54:46 -, 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
RE: [PHP] Detecting email bounces sent by the mail function?
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 -, 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