0

how can we check that a validated Email exist Or Not Without Sending test Email by c# codes?
we can check Validation of that email by many ways...
but what about existence?
is it possible to do that or not ?

thanks in advance

skaffman
  • 398,947
  • 96
  • 818
  • 769
SilverLight
  • 19,668
  • 65
  • 192
  • 300
  • No, you can't, and even sending a mail to it will only work in few cases as nowadays misdirected mails are quite often discarded instead of bounced. – fvu Aug 30 '11 at 16:17

4 Answers4

3

You should look at these websites. I've used a similar method to these three in the past when validating users emails for a federal website that required an authentic email address.

http://tools.email-checker.com/

http://verify-email.org/

http://www.technixupdate.com/check-whether-an-email-id-is-valid-or-not/

A mail server will usually quickly send back a response telling you if the email is valid or not, that is what you're going to be looking for.

As well, SO already has a few posts on this: Checking if an email address exists

is one of them.

Update:

I love the existence tag...!

Community
  • 1
  • 1
Ryan Ternier
  • 8,714
  • 4
  • 46
  • 69
  • Thanks for the great answer Ryan. Email-checker is good but gets expensive at higher quotas. What's the existence tag? – a20 Dec 01 '14 at 09:41
2

You could possibly use C# to run a cmd command - telnet. Then output the results to a text file and read them into to your C# app. This should help - http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email You will need to know the details for the mail server names though. You might be able to do this directly from C# but I have only done it through telnet.

Bali C
  • 30,582
  • 35
  • 123
  • 152
  • Also found this article with 10 seconds of Googling. Pay special attention to the part about catch-all addresses on some servers though - as @fvu said above, there's no real way to guarantee that the address exists beyond mailing it and checking for some action in response. – Xav Aug 30 '11 at 16:23
  • thanks for comments and answer -> but some body tell me why two downvotes ? – SilverLight Aug 30 '11 at 16:26
  • Also, `qmail` servers (by default) don't know whether the user exists until they attempt delivery. This results in a later bounce message, rather than a `550 recipient unknown` response. – Roger Lipscombe Aug 30 '11 at 16:27
  • @MoonLight I +1 for a good question (probably could have worded it different though - I don't have the reputation to do it though). Don't you mean downvote? Or are you talking about my answer? – Bali C Aug 30 '11 at 16:27
  • @bali there are so many reasons why that technique will fail that IMO it's not even worth bothering (MXes that are infact relays, blacklisting of your originating residential IP, sneaky failure modes in the server, etc etc) - read the comments on that article for more examples. – fvu Aug 30 '11 at 16:30
0

I don't know if there's a good way to do what you're looking for, but a solution that might get you part of the way there is to ping the domain to at least make sure that exists.

Here's an MSDN link which explains how to ping from .NET:

http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx

James Johnson
  • 45,496
  • 8
  • 73
  • 110
  • 1
    There is absolutely not a shred of relation between a domain being "pingable" and its ability to accept mail. Unless you ping the mail exchanger (DNS MX lookup) for that domain. And even then, see my comment on Bali C's answer. – fvu Aug 30 '11 at 16:32
-1

You can use a Regex Validation on the form before the user submits the data. It's an inbuilt tool in Microsoft Visual Studio where you can pretty much drag and drop :) You should be able to find it in the validation section . Regular expression Validator

Suits999
  • 369
  • 1
  • 7
  • 25