Click here to Skip to main content
15,909,466 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I verify if the email address does actually exist or not!!!!!!

please submit a reference link or details code.
Posted
Comments
Member 10641779 15-Apr-14 1:19am    
from where you want to check email address, in database?
nest101234 15-Apr-14 1:47am    
I want to check if email is in valid form or not
Herman<T>.Instance 15-Apr-14 5:09am    
check MX records, but most providers do not allow you to use that

As Sergey says, this is not possible.

So, if you want to validate whether Email Id is in correct format or not, you can try the method suggested at How to: Verify that Strings Are in Valid Email Format[^].

If you are doing ASP.NET Project, then you can also do this using JavaScript with Regular Expressions. You can easily get the Expression by searching on Google.
 
Share this answer
 
You cannot. This is not how mail protocols works. In principle, there is one way: send a mail requesting a confirmation of delivery, which is automatically sent when a user opens a mail. But first, this is not what you want, secondly, not all mail agents and especially mail clients will follow this request.

At best, you can ping the host owning the mail address. It won't tell you if the mail address itself actual or not.

—SA
 
Share this answer
 
Comments
nest101234 15-Apr-14 1:44am    
Thanks
OKK! I understood.. then please help me to check if the email address is in correct form or not

Thanks in advance
Sergey Alexandrovich Kryukov 15-Apr-14 10:57am    
Probably the best and simplest way is to use Regular Expression. Class Regex...
—SA
nest101234 16-Apr-14 0:15am    
thanks
Sergey Alexandrovich Kryukov 16-Apr-14 0:20am    
You are very welcome.
Good luck, call again.
—SA
C#
SqlConnection con= new SqlConnection("DataSource:xxxxxx ......");
SqlCommand cmd=  new SqlCommand("select * from TABLE_NAME where Email = "xyz@abc.com", con);
SqlDataAdapter da= new SqlDataAdapter(cmd);
DataTable dt= new DataTable();
da.fill(dt);

if(dt.Rows.Count > 0)
{
 MessageBox.Show("email address already exists");
}
 
Share this answer
 
v3
for example
XML
Connection con;
SqlCommand cmd = new SqlCommand("select * from TABLE_NAME where email = "abc@def.com", con);
SqlDataReader reader = cmd.ExecuteReader();
if (reader.HasRows)
    {
        MessageBox.Show("email address already exists");
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900