Category : .Net | Author : Chtiwi Malek | First posted : 12/11/2012 | Updated : 1/15/2013
Tags : email, validate, verify, check, test, components, .net
Free Asp.Net Email Validator/Verifier

Free Asp.Net Email Validator/Verifier

If you need to check if an email address really exists, this .Net component is for you.

How it works :

This free email validator/verifier component will check if an email address really exists by finding the mx records of the domain name, connecting to the mailbox’s smtp server and simulating the sending of an email (without really sending an email) and will test if a positive response is received to validate the address.

Features :

• Check Email Syntax (An accurate syntax check)
• Check if a domain name has MX records
• Read Mx records (get the mx records for a domain name or an email adress)
• Check SMTP Server (verify that the SMTP server is working and accept connections)
• Check Mailbox validity (connect to an email server directly via SMTP to check if mailbox is valid)

This component requires the Microsoft .NET framework and can be used in your website (webforms) or application (winforms).

Add a reference to the dll (or copy the file E-mail_Validator.dll to your bin directory)

It does not have a GUI front end, it is a component that can only be accessed programmatically, just create an instance :
Codicode.EmailValidator EV = new Codicode.EmailValidator();

please note that some mail servers always return a positive response even if the mailbox doesn’t exist.

C# code sample :

The following code will verify the validity of the email address, if no error was returned, then the email address is valid and can accept mails, if not and error message will be returned (account dosn't exist, no mx records, smtp timeout ...)
// We create an instance of our eMail-Validator Object
Codicode.EmailValidator Ev = new Codicode.EmailValidator();

// Set the Sender email (for smtp identification)
Ev.Mail_From = "";
// Check if the email address is valid and really exists
string errorMsg = Ev.Check_MailBox_Error(tbEmail.Text);

if (errorMsg == "")
      // the Mail Address/Smtp is valid and running
      lbStatus.Text = "Mail OK";
      // An error occured while validating the email
      lbStatus.Text = errorMsg;

// Close and Dispose

The following code will retrive the MX records list from an email's domain name :

// We create our eMail Validator Object
Codicode.Emailvalidator Ev = new Codicode.Emailvalidator();

// Get the domain's MX records
string[] Mx_Records = Ev.FindMXRecords(tbEmail.Text);
About the author :
Malek Chtiwi is the man behind
34 years old full stack developer.
Loves technology; but also likes design, photography and composing music.
Comments & Opinions :
Email Validator
Check_Mailbox function always return false (frame work 3.5)  for valied entry. Can u plz guide me
- by Solgin on 1/14/2013
use the Check_MailBox_Error function instead.
- by Chtiwi Malek on 2/8/2013
Hi! Apart from this Codi Code Email Verify website we can download DLL from the below mentioned website. Any how when we extract the Zip folder we found DLLs which supports according to .Net Framework Versions ie., .Net2.0,.Net3.0,.Net3.5,.Net4.0,.Net4.5. Actually the example that has provided in ZIP file is working fine for single email(provided in textbox). To check for Multiple emails see below code which is to be provided at Mainform.cs. Example: My database has 12,219 email. To check these emails I'm changing code in button click event like private void btnVerify_Click(object sender, EventArgs e) { // Update the UI // btnVerify.Enabled = txtEmailAddress.Enabled = false; // btnVerify.Text = "Working..."; // First lines of the log ClearLog(); Log("Verification started."); // Start the asynchronous verification process string s = "SELECT Email from SalesForceData1 WHERE Email Not in(select Email from SalesForceData1 where Email like '')"; da = new SqlDataAdapter(s, con); ds = new DataSet(); da.Fill(ds, "SalesForceDate1"); for (int i =958; i <= ds.Tables[0].Rows.Count-1;i++) { var verification = new Verification(ds.Tables[0].Rows[i]["Email"].ToString()); // MessageBox.Show(ds.Tables[0].Rows[i].ToString()); // var verification = new Verification(txtEmailAddress.Text); //TimeSpan span = new TimeSpan(0, 0, 0, 30, 0); //verification.Settings.DnsReceiveTimeout.TotalSeconds = span.TotalSeconds; var requiredLevel = ((VerificationLevelComboItem)cbLevel.SelectedItem).VerificationLevel; verificationEngine.BeginRun(verification, requiredLevel, ar => { // Complete the asynchronous validation VerificationEngine.EndRun(ar); // Update the UI Invoke(new MethodInvoker(() => { Log(String.Format("Verification completed. Last status: {0}", verification.State.Result.LastStatus)); // MessageBox.Show(verification.InputData+" "+verification.State.Result.LastStatus.ToString()); // MessageBox.Show("Failure"); con.Open(); SqlCommand cmd = new SqlCommand("usp_DAG_UpdateEmailStatus", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Email", verification.InputData); cmd.Parameters.AddWithValue("@Status", verification.State.Result.LastStatus.ToString()); cmd.ExecuteNonQuery(); string sucess = "SELECT count(Email) as Count from SalesForceData1 WHERE EmailStatus='Success'"; string totalcount = " SELECT count(Email) as Count from SalesForceData1"; SqlDataAdapter da1 = new SqlDataAdapter(sucess, con); DataSet ds1 = new DataSet(); DataSet ds2 = new DataSet(); da1.Fill(ds1); lblSuccessCount.Text = ds1.Tables[0].Rows[0]["Count"].ToString(); SqlDataAdapter da2 = new SqlDataAdapter(totalcount, con); da2.Fill(ds2); lblTotalCount.Text = ds2.Tables[0].Rows[0]["Count"].ToString(); con.Close(); // btnVerify.Enabled = txtEmailAddress.Enabled = true; // btnVerify.Text = "Verify"; })); }, null); } } Note:- Appropriate Dlls are gets registered as Public ie.,using GACUTIL.exe tool. These DLLS are not working for YAHOO domain email ids.
- by Siddendra Prasad on 6/27/2014
Msn live doesn't work
no msn or live account works with this dll,But the work is really good,can I have the codes ?
- by Shad on 1/24/2013
What messages are returned?
I get 000 : Timeout for my own email address; what does this mean? What messages does this routine return?
- by WebEngr on 2/22/2013
I too get the same error
- by Raaz on 1/6/2014
Getting 003 : No MX records found
I am getting   003 : No MX records found error even i gave correct mail address while using 3.5 framework dll in my web application. What is the reason for that? But in your site its working fine.
- by Mahesh on 2/26/2013
Yes its not working at all
- by Nimesh on 8/16/2013
I'm getting same Time out:000 error for all email address, even for good emails.. anyone got solution?
- by Vanam on 4/3/2014
Getting 003: No MX records found error for all my emails i validate (yahoo, google, whatever)
- by Helga on 8/25/2014
I'm getting the 003 as well.  I trapped the call and it's abending with a "No connection could be made because the target machine actively refused it".  I've tried port 25, 587, 2525 & 465.
- by Steve on 8/14/2015
For framework 3,5 ,its not working, throughing error.
      Its not perfrct code for the framework 3.5, its not validating the email.


- by shivanand on 3/7/2013
email varifier
i am beginner in this field pls  give the whole code for this so that i easly understand the code and implement it easly
- by suraj on 4/26/2013

Will the dll also work with VB or only C#?

- by Heinrich on 6/13/2013
Support for .NET Framework 4.5 and Windows Forms Applications
Will you release a version that supports .NET Framework and that can be used in a Windows Forms application also? Or release the source so that I can try and fix this myself?
- by jorbjo on 8/13/2013
- by kmdlfkvgldf on 9/25/2014
- by s on 11/6/2014
so helpfull
thank u so much... I need to know how to signup by facebook
- by M k Pradhan on 12/14/2014
not worked at all
it 's not working
- by sdfjl on 2/2/2015
Not work!
thank you! but this dll does not work :(
- by kendy on 2/7/2015
- by aaa on 7/3/2015
Hi. Sir,

I am really happy with this artical 
Thank You
- by aaa on 7/3/2015
fdgdgdfg dfg dfg dfg dfg dfg
- by aaa on 7/3/2015
hi sir this article is very usefull 
- by Bunty on 7/3/2015
EMail Validator
Please COnfirm which assembly use for this code
- by sunil soni on 8/10/2015
I am Getting 003: No MX records found error
I am Getting 003: No MX records found error for all my emails i validate (Gmail, google, whatever).i gave correct mail address while using 4.0 framework .
- by Dharmendar Singh on 9/28/2015 Arizona Coyotes Jersey
- by on 11/30/2015
Cheap UGGS Sale Online Vancouver Canucks Cheap UGGS Boots
- by on 12/4/2015
Email checking
It's good but
Where is Codicode class and where is the method EmailValidator
- by Sudheer on 1/5/2016
Cheap Cam Newton Jeersey Seattle Seahawks Super Bowl Merch Cheap Peyton Manning Elite Jersey
- by on 1/29/2016
Not working
Its not working.. Ples help me
- by Music on 4/17/2016
003 : No MX records found error
I am getting   003 : No MX records found error even i gave correct mail address while using 4 framework dll in my web application. What is the reason for that? But in your site its working fine.
help me
- by amir on 5/11/2016
003 : No MX records found error
I am getting   003 : No MX records found error even i gave correct mail address while using 4 framework dll in my web application. What is the reason for that? But in your site its working fine.
help me
- by amir on 5/11/2016
How come there are thousands of SEO linkbuilders work from Pakistan? They are the most common experts anyway Added to Digg, it will be useful to people over there
- by on 5/30/2016
Toos Verify Emails
You check tool Verify Emails iClick
Check all type Yahoo, Microsoft, Gmail, Webmail...
Here is link: (base on .NET 4.0)
- by ngohoangminh on 6/21/2016
.NET Code
If you want source code contact me by
- by ngohoangminh on 6/21/2016
Get Authentic Nfl Jerseys Wholesale China, More Cheap Hot Jerseys Contact Us Online.
- by on 6/28/2016
There are not Predators 59 Roman Josi Yellow Home Stitched NHL Wholesale Jerseys for sale, but free designed Cheap Jerseys Free Shipping free shipping. More from:
- by on 7/13/2016
There are not Nike Carolina Panthers Customized White Stitched Elite Youth NFL Wholesale Jerseys for sale, but MLB Jerseys Promo Shop promotion sale free shipping. More from:
- by on 7/14/2016
Free designed Wholesale Olympic Jerseys hot populare and Wizards 2 John Wall White 2012 Revolution 30 Stitched NBA Wholesale Jerseys free shipping. from:http://xn--80aaggsdegjfnhhi.xn--p1ai/?option=com_k2&view=itemlist&task=user&id=388688
- by on 7/19/2016
unable to unzip download
download zip file seem corrupted.
Can u send me a new zip file? 
- by james on 7/19/2016
unable to unzip download
pls send me working zip file.
- by james on 7/19/2016
Fans Cheap NFL Jerseys from China hot populare and free designed Wholesale 2016 UEFA Euro Jerseys free shipping. from:
- by on 7/25/2016
Olympic Games Gear for sale and Super Bowl Jerseys Cheap Tim Duncan.
- by on 7/29/2016
Amazing issues here. I am very glad to look your post. Thank you so much and I'm having a look forward to touch you. Will you kindly drop me a e-mail? Olympic Game Uniforms Outlet
- by on 7/29/2016
Why people still make use of to read news papers when in this technological world everything is existing on net? kevin durant press conference
- by on 8/17/2016
I have been exploring for a little for any high-quality articles or blog posts in this sort of space . Exploring in Yahoo I eventually stumbled upon this web site. Reading this information So i'm happy to exhibit that I have a very just right uncanny feeling I found out exactly what I needed. I most undoubtedly will make sure to do not forget this website and give it a look regularly. nfl bottle cap necklaces
- by on 8/19/2016
It's perfect time to make some plans for the long run and it is time to be happy. I have read this post and if I could I wish to suggest you some attention-grabbing things or advice. Maybe you can write next articles referring to this article. I wish to learn even more things about it! cleveland cavaliers radio network online
- by on 8/23/2016
Paragraph writing is also a fun, if you know afterward you can write otherwise it is difficult to write. cleveland cavaliers roster 2007 stats
- by on 8/27/2016
Everyone says that proper SEO doesn't work or business is dying, what do you think over the way ahead for SEO? p.s Stay away from the Warrior Forums lol
- by on 8/30/2016
email validation
Check validator

- by creiglee on 9/5/2016
thank you for article
Awesome post! I’ll check out some of the tools you mentioned here. I also use provides organization for integration with your mailing client delivering marketing information to targeted audience
- by Roman on 2/10/2017
Issue with email address
In my case only working with email address that uses gmail yahoo or these kind of boxes.
- by Roberto on 10/17/2017
new mlb jerseys S7
Ebay same style usa soccer jerseys to offer. Online free shipping - Cheap Canucks 17 Ryan Kesler Blue Stitched Youth NHL Jersey
- by on 10/19/2017
Help Please
Can u plz mail the source code.
- by Need Source Code on 12/7/2017
cheap jerseys online w4
I am cheap jerseys red supplier online, take coupon code here: cheap jerseys club
- by Lavern on 4/27/2018
slot game
online gambling casino cassino kasino online gambling casino casino games real money
- by Bernardo on 6/18/2018
casino games slots
online casino gambling online casino games play casino games online online slots casino games
- by Rene on 6/19/2018
casino casino games casino casino online online casino
- by Gabrielle on 6/23/2018
Leave a Comment:
Name :
Email : * will not be shown
Title :
Comment :