How to check the given email (any valid email) address exists or not using ASP.NET?
-
1Are you talking syntax or whether it actually exists? In the latter case, you can't; It will simply bounce back. Check similar question here: http://stackoverflow.com/questions/7246341/how-check-a-validated-email-exist-or-not-without-sending-test-email-by-c-sharp-c – IrishChieftain Oct 03 '12 at 11:23
-
What do you believe it means for an email address to 'exist' ? – AakashM Oct 03 '12 at 11:30
-
http://lamsonproject.org/blog/2009-07-09.html – IrishChieftain Oct 03 '12 at 11:52
-
Possible Duplicate **http://stackoverflow.com/questions/565504/how-to-check-if-an-email-address-exists-without-sending-an-email** – huMpty duMpty Oct 03 '12 at 12:43
5 Answers
you send invitation mail to user with encrypted key..
If user is verified you have to verified key and you have only verified email..

- 5,498
- 1
- 19
- 31
You can't check if an email exists without actually sending an mail.
The only thing you can check is if the address is in a correct shape with regexes:
string email = txtemail.Text;
Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
Match match = regex.Match(email);
if (match.Success)
Response.Write(email + " is corrct");
else
Response.Write(email + " is incorrct");

- 38
- 4
-
This is just checking for valid email **FORMAT** !!!. Every email that has a proper format may not exist – huMpty duMpty Oct 03 '12 at 12:41
Here's a code solution that may work for you. This sample sends a message from address different from From: address specified in the message. This is useful when bounced messages should be processed and the developer wants to redirect bounced messages to another address.
http://www.afterlogic.com/mailbee-net/docs/MailBee.SmtpMail.Smtp.Send_overload_3.html

- 15,108
- 7
- 50
- 91
The full process is not so simple. Its required a full communication with the email server and ask him if this email exist or not.
I know a vendor that give a dll that make all this communication and check if the email exist or not on the server, the aspNetMX at http://www.advancedintellect.com/product.aspx?mx

- 66,005
- 16
- 114
- 150
First you need to import this namespace:
using System.Text.RegularExpressions;
private bool ValidateEmail(string email)
{
Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
Match match = regex.Match(email);
if (match.Success)
return true;
else
return false;
}
Visit Here to full source code.

- 21
- 1