Nulldevice
Nulldevice

Reputation: 4006

How to check misspelled email during user registration

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)?

Upvotes: 1

Views: 802

Answers (5)

nikib3ro
nikib3ro

Reputation: 20606

For user parts of email the only thing I can think of is using:

  • MX lookups (if mail provider doesn't block them... since that can be abused to filter email lists)
  • Requiring user to enter email twice to ensure he doesn't misspell user portion of email

As for domain part of email, take a look at this:

AngularJs directive to offer suggestions for misspelled emails?

It helped me to reduce bounce for misspellings like gmai.com and gmail.con.

Upvotes: 0

Anthony Forloney
Anthony Forloney

Reputation: 91816

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.

Upvotes: 2

Opera
Opera

Reputation: 983

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.

Upvotes: 1

Austin Salonen
Austin Salonen

Reputation: 50235

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.

Upvotes: 1

Yes - that Jake.
Yes - that Jake.

Reputation: 17129

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.

Upvotes: 1

Related Questions