views:

51

answers:

3

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 successfully sent or not?

Update

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

+6  A: 

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.

amarsuperstar
+1: for the good link
Zenuka
Yeah, thanks for the link, and that image thing sounds like a great idea! I'm gonna try it. But wouldn't an image blocker be an obstacle though?
Alex
@Alex: a confirmation link that the end-user clicks is an option as well; there is no *real* way to ENSURE delivery without some sort of verification on the other end.
DanP
Yep, image blockers will stop this straight away, however there is no foolproof reliable way to check if an email was received. Best thing to do is implement the things in Jeff's post to give the message the best possible chance, and give the users and easy way to resend the original message.
amarsuperstar
@DanP, You are right. And I just realized that the image thing would not work any way, because the user would leave the page, check the mail and got nothing. Same thing.
Alex
+4  A: 

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.

Robaticus
A: 

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.

DanP