开发者

How to handle bounced emails?

The users of my app can send e开发者_如何学JAVAmails to a set of people. Some of the emails might be invalid. I need to let the user know which emails bounced.

Is this possible to do? If yes, any pointers will be helpful.

I use .NET, C# to send email. I don't use any third part tools to send mails.

Thanks


I have done this a couple of years ago using http://mailsystem.codeplex.com/. It is open source now but it cost me money back then.

You will receive a message back indicating a bounce and there are properties in the code that gives you the original sender so you can deliver it properly.


You can take a look at MailBounceDetector repository.

Hope this helps.


A "bounce" generally goes back to the sender of the email, not your application. It's not really designed to be handled by an application in the way you suggest. The user(s) should receive notification of the bounce from the email server(s) in question (assuming all goes well, as OMG Ponies said there's really no reliable way).

In order for your application to be the recipient of the bounce and respond to it in any meaningful way, a lot of work would have to be done on your part. Your application would basically have to be the mail server for the user account on behalf of which it sends the emails. It'll have to listen on port 25 and parse incoming messages for bounces.

This is no trivial task. Just "being a mail server" works fine in theory, except that most other mail servers in the world are going to ignore you unless you're a proper domain with proper MX records and all that. Also, if you're listening for incoming stuff on port 25, expect a lot of noise.

It's best to let the users receive the bounces properly by having the mail be sent on their behalf in the first place.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜