views:

31

answers:

1

Here's something I couldn't find an answer to. Say you have a form and on that form you have a field for someone to enter their e-mail address. Now after the e-mail address is entered, is there a way after using RegEx to verify that it follows the syntax of an e-mail address, to then verify that it is a valid e-mail that can receive messages? I looked all over the net and found a deprecated way to do it that has since been stopped by patches, so I was wondering if there wasn't a way to do it on the server maybe polling the smtp server or something.

+2  A: 

If you're looking to verify that the user hasn't made a mistake (or is giving you a bogus address because they aren't interested in your messages), you should probably do what every other system does: don't activate the account (or whatever) until you get some verification that the user has gotten the email by clicking a link or entering a code that the email contains.

You need to do this because you might never get an indication that an email address is invalid - some servers are configured to throw away some (or all) invalid email addresses or dump them in a spam bin. Just because the email appears to have been successfully sent doesn't mean it's valid or that it's getting to the right person.

Michael Burr
I'm going to do that, but I'm still going to try and get this other way to work just for fun. :)
stephmoreland