开发者

ASP.NET MVC How to determine if the e-mail didn't reach the receiver

In my web application an e-mail with credential information is sent to every newly registered user.

For some reason, Hotmail and some other mail providers don't accept these e-mails at all (by the way, I send via hMailServer, maybe you know how to fix that) - they are neither in the spam nor in the inbox folder.

So the users leave the page, check mail and get nothing. They have to use a separate page to give another e-mail, which is not cool.

So how can I check if the mail was s开发者_运维知识库uccessfully sent or not?

Update

I realized that there's no way to do it...


With regard to best practice (e.g. setting up SPF records) Jeff Atwood has a great post on this, see: http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

To check if the email sent, you simply place an image in the email which requests data via your application, and therefore log the fact the user has opened the email. If the request "/images/something.jpg?id={identify-the-user-and-message-here}" is routed through your app, you can just register the user has seen the email, then return the image, or indeed nothing.


It sounds like you're asking if there's a way in real time to check to see if your user got the message. If so, I would recommend that you don't pursue that path. While most times email delivery seems to be instantaneous, it could be held up for any length of time prior to being delivered to the recipient's mailbox.


In addition to the methods already posted, I can highly recommend the EmailVerify.NET component, which can perform quite a few levels of tests on a given email address before you attempt the send in the first place.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜