Email Verification Web service
hi, i have developing a web service for verifiing the given email address is available or not in any SMTP servers....so, i need some idea for verifing email address....and usefull links for some good articel about my problem...
thanks
Ramesh
Answers
Again, what do you mean by "valid"?
-
Do you mean that you want to confirm that the address is in the correct form to be an email address? If so, then use a regular expression.
-
Do you mean that you want to be certain that there is really such an email address at the destination server? Then you need to look at the SMTP protocol to see if there's a way to do that (see http://www.ietf.org/rfc/rfc2821.txt).
-
Do you need to ensure that if you sent an email to that address, that the user would receive it? You can't. The only way would be to send the message and see if it is received.
- Marked As Answer byJohn SaundersMVP, ModeratorTuesday, November 17, 2009 3:15 AM
- Proposed As Answer byAmadeo Casas - MSFTModeratorFriday, November 06, 2009 6:43 PM
-
All Replies
If I understand you correctly, you want to be able to determine whether a given email address is valid. If I'm guessing wrong, please let me know.
If this is the case, as far as I know, the only way to do it is to send a message to that address and see what happens. You can asynchronously send an empty e-mail message and see if an exception occurs, using the System.Net.SmtpClient class.
If you simply want to validate that an email address is in the correct format, then you should use regular expressions to validate it.
If neither of these are what you're looking for, then please explain further.
Here whats my problem is check an email address is value or not without sending an empty e-mail message to that email.. can i do this?Again, what do you mean by "valid"?
-
Do you mean that you want to confirm that the address is in the correct form to be an email address? If so, then use a regular expression.
-
Do you mean that you want to be certain that there is really such an email address at the destination server? Then you need to look at the SMTP protocol to see if there's a way to do that (see http://www.ietf.org/rfc/rfc2821.txt).
-
Do you need to ensure that if you sent an email to that address, that the user would receive it? You can't. The only way would be to send the message and see if it is received.
- Marked As Answer byJohn SaundersMVP, ModeratorTuesday, November 17, 2009 3:15 AM
- Proposed As Answer byAmadeo Casas - MSFTModeratorFriday, November 06, 2009 6:43 PM
-
I'm a bit in late with this reply but I'm posting it anyway because it may be useful for future readers.
In my company website we host some webservices which use EmailVerify.NET (http://www.emailverify.net), a Microsoft .NET component which supports e-mail syntax checking, domain MX test and mailbox validation too.
E-mail validation up to the mailbox level is easy as writing the following code block:var verifier = new EmailVerifier(); var result = verifier.Verify("me@example.com", VerificationLevel.Mailbox); if (result.IsSuccess) { // Go on, send the message }
Additional code samples can be found here.
From their home page:
EmailVerify.NET is a powerful .NET component which verifies email addresses using various techniques, including:- Syntax verification, according to RFC 2821 and RFC 2822
- MX record lookup
- Disposable email address (DEA) validation
- SMTP availability check
- Mailbox existence check, with greylisting support
- Catch-all test
It is completely written in managed code (C#) and is compliant with the Common Language Specification (CLS), so it can be used with any other .NET language, including VB.NET, C++/CLI, J#, IronPython, IronRuby and F#.
The price for this component is very small (less than 50 bucks) and their support is one of the greatest I've ever found for a small software company like they are.
Hope this helps.- Marked As Answer byAmadeo Casas - MSFTModeratorFriday, November 06, 2009 6:42 PM
- Unmarked As Answer byAmadeo Casas - MSFTModeratorFriday, November 06, 2009 6:43 PM


