CodeIgniter Forums

Full Version: how to track bounced mail anybody know ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]umefarooq[/eluser]
Hi anybody can help me on the problem, how can i handle or track bounced mail with ci mail or any other solution also welcome

El Forum

[eluser]Flemming[/eluser]
Hi, bounced mail will generally come back to the address it was sent from - so you could look for a pop/imap class to integrate with CI that would allow you to automatically check for new emails in the 'bounced' mailbox. You can set it up on a cron to check every hour or whatever suits you.

A CI user called Sophistry has written an imap_pop class - search the forums for it, I think it has some documentation as well.

EDIT: here you go: http://codeigniter.com/wiki/imap_pop_class/

El Forum

[eluser]Myles Wakeham[/eluser]
[quote author="umefarooq" date="1258983675"]Hi anybody can help me on the problem, how can i handle or track bounced mail with ci mail or any other solution also welcome[/quote]

Its pretty easy. All you need to do is to use fopen in PHP to open a POP3 link to the mail server where the bounces are being returned to. That is typically the FROM address that you sent the email from. Then you will need to parse the headers to get the bounce emails and match them to the FROM addresses that you sent out. When you get a match, it bounced. No match means you don't know specifically if it bounced (of course a spam filter on the recipient end may be junking your emails without any notification to you).

Myles

El Forum

[eluser]umefarooq[/eluser]
really thanks this library looking good, i will give a try and put my question in case of any error