Jump to content

Detecting Bounced EMails


JasonORDSW

Recommended Posts

Can anyone help me?

I have a member profile system, and have php mail() generated emails that are sent to the members of the site.

I am trying to recode the site so that if an email is undeliverable, it then bounces back to my BOUNCE@domain_name.com address.

I then use this on the administrative side of the site to determine which accounts to flag, so when a user then logs onto the site, they are required to update thier email address before continuing on.

I have tried several attempts at different things, and have real A LOT of examples on php mail() but I am not able to have any luck.

Can anyone help? or provide a tutorial/examples of such coding?

THANKS!

Jason
Link to comment
Share on other sites

  • 4 weeks later...
Does anyone have any commentson this? :)


[!--quoteo(post=377235:date=May 26 2006, 01:36 AM:name=JasonORDSW)--][div class=\'quotetop\']QUOTE(JasonORDSW @ May 26 2006, 01:36 AM) [snapback]377235[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can anyone help me?

I have a member profile system, and have php mail() generated emails that are sent to the members of the site.

I am trying to recode the site so that if an email is undeliverable, it then bounces back to my BOUNCE@domain_name.com address.

I then use this on the administrative side of the site to determine which accounts to flag, so when a user then logs onto the site, they are required to update thier email address before continuing on.

I have tried several attempts at different things, and have real A LOT of examples on php mail() but I am not able to have any luck.

Can anyone help? or provide a tutorial/examples of such coding?

THANKS!

Jason
[/quote]
Link to comment
Share on other sites

As the [a href=\"http://www.php.net/manual/en/function.mail.php\" target=\"_blank\"]fine manual[/a] says:
[quote] Returns [b]TRUE[/b] if the mail was successfully accepted for delivery, [b]FALSE[/b] otherwise.

It is important to note that just because the mail was accepted for delivery, it does [b]NOT[/b] mean the mail will actually reach the intended destination. [/quote

What have you tried?

You can try setting the fifth parameter to the mail function to be the bounce address:
[code]<?php
$bounce = '-f BOUNCE@domain_name.com address';
mail($to,$subject,$message,$hdrs,$bounce);
?>[/code]

Ken
Link to comment
Share on other sites

A lot of email verification systems use an authentication token. It's generated randomly and then a link is sent in the email. The user follows the link which gives a script the authentication token, the script then checks whether the token is associated with anyone in the database in which case it validates the user. That way, if someone enters an undeliverable address, they will never receive the email and so will be unable to validate their account. Then whenever they try to access the site they're prompted for either the activation code or a correct email address.
Link to comment
Share on other sites

I understand that.. and my site is set up that way.. but my point is where one would send out a email to them at a later time.. AFTER they verified their email though this process.. Peoples emails do over time become invalid, and if I get a bounce back on a member that has closed an email account, I want to be able to flag their account to update the system with a new email...


[!--quoteo(post=385146:date=Jun 17 2006, 07:23 PM:name=Fyorl)--][div class=\'quotetop\']QUOTE(Fyorl @ Jun 17 2006, 07:23 PM) [snapback]385146[/snapback][/div][div class=\'quotemain\'][!--quotec--]
A lot of email verification systems use an authentication token. It's generated randomly and then a link is sent in the email. The user follows the link which gives a script the authentication token, the script then checks whether the token is associated with anyone in the database in which case it validates the user. That way, if someone enters an undeliverable address, they will never receive the email and so will be unable to validate their account. Then whenever they try to access the site they're prompted for either the activation code or a correct email address.
[/quote]
Link to comment
Share on other sites

I found this:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]stevenlim at Edinburgh-Consulting dot com
06-Sep-2002 01:53
How to detect a bounce email

1. make sure the email you send out have the header
"Return-Path: detect-bounce@yourdomain.com\r\n",
&
"Return-Receipt-To: bounce@yourdomain.com\r\n"

2. setup this detect-bounce mail account at your mail server

3. redirect the incoming mail from this email account to your php script (check your mail server doc on how do this)

4. your php script will then be able to process the incoming email in whatever way you like, including to detect bounce mail message (use regexp search).

Note that the mail will be not be store after the mail server has redirect to your script. If you want to store it, you need additional code in your script

Hope the above help

Steven Lim
IT Consultant (www.Edinburgh-Consulting.com)
11-Apr-2002 09:35 [/quote]

-can't tell you more than that
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.