visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: php how to detect bounce email


By: Bernard France  Date: 15/06/2007 15:02:04  English  Points: 20 Status: Answered
Quality : Excellent
how to detect bounce email in PHP ?
By: VGR Date: 15/06/2007 15:45:00 English  Type : Answer
hummmm I guess you send e-mail from PHP, using mail() ? Right ?

Then the answer is relatively simple :
- if mail() returned no error (550, usually) the mail was sent to your SMTP server
- you won't have the bounce, because it will come into your mailbox (usually retrieved via POP or IMAP) and your PHP system is NOT listening to your mailbox, right ? ;-)

This said, some precisions :
1) you could use fsockopen() and the like in stead of mail() : it doesn't matter.
2) your PHP scripts could detect the bounce by looking into your mailboxes' files, but I don't recommend this.
3) using a specially crafted "From" address in the process is not that useful
4) the only imaginative solution I cann see is involving you to have your OWN SMTP server and your OWN specially-crafted From address. This could work ;-)
You'll find a complete description on how to build such a system (for free) at http://www.fecj.org/extra/Hosting-Your-Own-Domain-Windows-Server-Part-1-DNS-Hosting.html
or on ERT.com ; the part 2 explains how to set a custom (and secured) SMTP server with a local POP connection. You could configure such a server to accept only your specially-crafted bounce address and thus detect the bounces easily. The PHP scripts would just read the maildrop (don't setup a POP onnection with your email client or it would empty the maildrop and clutter your "normal" mailbox). The PHP scripts could use POP3 to get the emails representing the "bounces". That's relatively easy too.
By: OpConsole Date: 01/11/2007 16:14:13 English  Type : Comment
Dear,

If you found some of the above comments to have proved helpful in solving your issue, you shall Accept the Answer or sPlit points between the various useful comments. Each one can receive a quality evaluation from + (somewhat helpful) to +++ (working solution).

Given this Question has been Open for quite a while now, please accordingly "accept an Answer" ASAP

This Question will be randomely force-closed in one month from now.

Thanks and regards.

Admin.

Do register to be able to answer

EContact
browser fav
page generated in 243.225100 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page