8

Possible Duplicate:
How to check if an email address exists without sending an email?

How can you check if an email address actually exists (not just validating)? How do these guys do it: http://www.email-unlimited.com/tools/verify-email.aspx

It seems to work...

Community
  • 1
  • 1
Prabhu
  • 12,995
  • 33
  • 127
  • 210
  • 5
    They can't, not in any reliable way. More than likely, this is just a scam to harvest email addresses. – Oliver Charlesworth May 03 '11 at 17:15
  • @Charlesworth: I thought that it might be scam too...but I did try out a bunch of email addresses (especially in the domain I'm specifically interested in) and it sure works. Even if it's not reliable in all cases, I'd like to know how they might have coded it as at least I know it will work for the domain I'm interested in. – Prabhu May 03 '11 at 17:18
  • See [this](http://stackoverflow.com/questions/565504/how-to-check-if-an-email-address-exists-without-sending-an-email). – Anton Gogolev May 03 '11 at 17:16
  • not able to answer this, so just commenting on this, **the best idea** as Mudassar said [here](http://aspforums.net/Threads/504422/How-to-validate-whether-email-address-exists-or-is-valid-client-side-in-ASPNet-MVC/) is : You need to send activation code to his email and then ask user to enter it on your site, examples to do it in asp mvc can be found [here](http://www.asp.net/identity/overview/features-api) and [here](http://stackoverflow.com/questions/19295236/email-confirmation-with-mvc-5-and-asp-net-identity), hope helps someone in future. – Shaiju T Apr 23 '15 at 05:24

4 Answers4

3

The SMTP protocol has the command RCPT that receives a mailbox on the server and may return an "ok" code if that mailbox exists. Note that some servers don't do this in order to prevent spammers from scanning for valid addresses.

What email-unlimited do is the following:

  1. Use the email domain to find the SMTP server
  2. Start a session with that SMTP server and send it the command RCPT TO:
  3. End the session

If the SMTP server returns an "ok" code in step 2, then they decide that the mailbox exists.

Elad
  • 3,145
  • 2
  • 20
  • 17
2

Found this at link: http://wiki.cdyne.com/index.php/CSharp_Email_Verification

  1. Open a new/existing project.
  2. In the Solution Explorer, right click the project you wish to add the service to and select "Add Web Reference." If "Add Web Reference" is not listed, select "Add Service Reference", then "Advanced", and then "Add Web Reference."
  3. Put the WSDL for Email Verification in the URL block. (ex: http://ws.cdyne.com/emailverifyws/emailverify.asmx?wsdl)
  4. Change "Web Reference Name" to something more usable, like "EmailVerify".

//Instantiate EmailVerify
EmailVerify.EmailVerify ev = new EmailVerify.EmailVerify();

//Assign ReturnValues to the VerifyEmail method and pass in: email and License Key
EmailVerify.ReturnValues rv = ev.VerifyEmail("info@cdyne.com", "0");

//Assign ReturnValues to the VerifyEmailWithTimeout method and pass in: email, timeout, and License Key
EmailVerify.ReturnValues rvt = ev.VerifyEmailWithTimeout("info@cdyne.com", "5", "0"); 

//Get the response for VerifyEmail (you can choose which returns to use)
Console.WriteLine(rv.ValidLicenseKey);
Console.WriteLine(rv.CorrectSyntax);
Console.WriteLine(rv.EmailDomainFound);
Console.WriteLine(rv.EmailDisposable);
Console.WriteLine(rv.DomainVerifiesEmail);
Console.WriteLine(rv.DomainAcceptsMail);
Console.WriteLine(rv.EmailVerified);
Console.WriteLine(rv.Timeout);
Console.WriteLine(rv.DomainServersDown);
Console.WriteLine(rv.GoodEmail);

//Get the response to VerifyEmailWithTimeout (only using chosen responses)
Console.WriteLine(rvt.EmailDisposable);
Console.WriteLine(rvt.DomainVerifiesEmail);
Console.WriteLine(rvt.DomainAcceptsMail);
Console.WriteLine(rvt.EmailVerified);
Console.WriteLine(rvt.Timeout);
Console.WriteLine(rvt.DomainServersDown);
Console.WriteLine(rvt.GoodEmail);
Sean Vieira
  • 155,703
  • 32
  • 311
  • 293
Keerigan
  • 1,182
  • 1
  • 9
  • 17
  • thnx , I always like to use services for doing such things. Is Cdyne providing more services like this for free? – Spyros Nov 20 '12 at 08:25
  • EmailVerify.EmailVerify ev = new EmailVerify.EmailVerify(); I am not able to get EmailVerify after. Are you sure this is the correct wsdl? – Pratik Gaikwad Jan 12 '14 at 04:27
0

You connect to the SMTP server of the domain that is handling the email and ask it. More information here:

http://www.the-welters.com/professional/smtp.html

Lou Franco
  • 87,846
  • 14
  • 132
  • 192
0

If you try the service you can see it connects to the SMTP server and tried to send an email to the email specified. The important thing is to connect to the SMTP server of the destination account. For SMTP commands see http://www.yuki-onna.co.uk/email/smtp.html

prtsoft
  • 26
  • 3