Languages :: PHP :: php how to detect bounce email |
|||
| By: Bernard |
Date: 15/06/2007 15:02:04 |
Points: 20 | Status: Answered Quality : Excellent |
| how to detect bounce email in PHP ? | |||
| By: VGR | Date: 15/06/2007 15:45:00 | 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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








