By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,968 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,968 IT Pros & Developers. It's quick & easy.

Verify Email Address

P: 116
I am trying to verify that the email addresses entered into our site are valid. Basically are they fake addresses or not and if I send them an email there will be an inbox associated with that address.

All I keep finding on the web is info for validating with regex... If anyone knows how to do this or knows of a site that could help, please let me know.

May 15 '08 #1
Share this Question
Share on Google+
2 Replies

Shashi Sadasivan
Expert 100+
P: 1,435
regex can only make sure that the email adddress entered is sytacticaly correct

i.e. there is an '@' in between the words and end with a .com, /.edu, or other domains (list goes bigger, as you go international)

To check if an email actually exists, a good way would be to send an email, if a failure email is recieved from the email provider, you should move that email entered into your own database, to check against before you verify another email.
May 15 '08 #2

P: 6

You don't HAVE to use Regex (Although it a lot more in depth). I would suggest for starting out you can to EmailAddress.Contains("@"); and EmailAddress.Contains(".");

This is a start. As for verifying, you can just make a random numbers then make concat a string together.

string toSend = "Please click the link below to register : http://MyWebSite.Com/WebMail/Register_" + EmailAddress + "_Code" + RandomNumber + ";

Granted you would have to store the ID in MySql for verification back.
May 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.