开发者

How to trace Bouncing E-mails in Action mailer (Rails)

I am开发者_如何转开发 using Active mailer to sending Emails,

I want to trace the mail ids which are bounced when i am sending the mails to the user.

Please give your valuable comments guys.

Thanks in Advance.

*HIKKU


One solution is to use unique From-addresses when sending emails. For example when sending email to user with ID 666, use the from address no-reply-666@example.com.

Then setup a script that receives the replies. If the reply is a bounce pull out the msg-id or whatever you need from the mail and store it.

Detecting whether the reply was a bounce or an actual reply from a real user can be tricky, because not all MTAs format the bounce messages properly.

An alternative to Postmark could be MadMimi.


I recently switch to using the email service Postmark, just so I could know about bounced emails better. They have a bounce api and support webhooks. I never could figure out a way to get that information back to my app from the MTA I had running. It is a pay service so it might not work for you, but it has been useful for my project.


There is a good explanation in Recepie #70 http://www.pragprog.com/titles/fr_rr/rails-recipes

Also take a look at http://blog.gipoo.net/2010/5/26/handling-bounced-emails-in-ruby-on-rails

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜