The below Code Snippet Steps will throw an exception, if the domain is not valid, so that you can flag that the email address is invalid.
string[] emailhost = (emailAddress.Split('@'));
string EmailHostName = emailhost [1];
IPHostEntry IPhst = Dns.Resolve(EmailHostName );
IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25);
Socket s= new Socket(endPt.AddressFamily,
SocketType.Stream,ProtocolType.Tcp);
s.Connect(endPt);
More Info
http://www.codeproject.com/Articles/5189/Effective-Email-Address-Validation
*********************************************************************************************************************************************************
Suggestion :
If you want validate all social email id.... you can follow this
1) Email syntax validation.
2)Use the SmtpMail class of ASP.NET application by adding a reference of System.Web.dll library then add the System.Web.dll.
Then use this code
System.Web.Mail.SmtpMail.SmtpServer = "your server";
string to = "you@email.com";
string from = "someone@email.com";
string subject = "Email Test";
string body = "Test Body";
System.Web.Mail.SmtpMail.Send(to, from subject, body);
Use try Catch Based on the successes value you can...verify it...
Saratvaddilli, if this helps please login to Mark As Answer. | Alert Moderator