views:

111

answers:

4

I use an email registration and confirmation in my project (yes, I know about OpenID. In my counry, a main email service lacks it).

Sometimes users misspell their email addresses. I know about this due to "message could not be delivered" letters in a mailbox. A misspelled address is absolutely correct, because I check it with a regular expression - say, jon[email protected] intstead of john[email protected]. And I do not want to duplicate a email field in a registration form (who likes it?).

Request processing routine cannot wait for email delivery - it could take an unpredictable time. So, my script will return to user a confirmation message "An email was sent". And the user will wait for it forever (of cause, not - he/she will turn to an alternative project with a more perfect registration system).

Does someone knows how it can be improved (in any programming language)?

+1  A: 

Unfortunately, there's no canonical way to spell anything in an e-mail address and no way to check programmatically whether it's spelled correctly or not. The only tool that can confirm the correctness of a valid e-mail address is Eyeball 1.0, which runs client side.

Jekke
+2  A: 

If you cannot wait for a response back from a confirmation e-mail, I would display a yes/no message box confirming their e-mail (i.e Send e-mail to [email protected]?) before sending the e-mail. While your at it, you can check to see if the e-mail is a duplicate as well.

If no duplicate found and they click "Yes" then send the e-mail. If not, ask them to re-enter the e-mail address.

With this approach you have gone above and beyond validating correct e-mail addresses since there are no services that will explicitly check for correct/valid addresses.

Anthony Forloney
In bold it much better :)
Nulldevice
Italics didn't emphasize enough ;)
Anthony Forloney
+1  A: 

You can try the SMTP VRFY on the server but most won't reply with anything valuable. Most will simply say "go ahead and try it" because returning something useful would be invaluable to spammers.

Austin Salonen
Thank you, I will check this.
Nulldevice
+1  A: 

You can always check the domain name with a DNS lookup but the only way to check an email address is to send a message.

Try to have the user type his email twice with an email confirmation field (as for the password).

EDIT : Anthony's idea is good too.

Opera
do you like sites that ask to enter email and password twice?
Nulldevice
I think it's a pretty decent solution to the problem if you are really concerned that the value is correct. Just be aware that many people probably cut and paste the first value into the second field.You could consider making the second field optional, with a caption like "If you type your email a second type we can check for accidental typographical errors. This is not required".
Bryan Oakley