Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verifying an email address exist in C#

Regarding this post about email verification,

using C#, how would you

  1. issue a VRFY command
  2. issue a RCPT command
like image 853
Kenneth J Avatar asked Jun 15 '10 14:06

Kenneth J


People also ask

Which Validator is used to validate the email address in C#?

We can use C# Regex class and regular expressions to validate an email in C#.


1 Answers

I think you will find that in many instances these functions will intentionally lie to you to defeat spammers. If there were a way to confirm an email is real other than having a user click on a validation (or unsubscribe....) link then spammers would be very happy people.

Just to be clear, the best way to verify an email address is to send a user an email containing a link, and wait for them to click on the link to verify they received the email. Any other technique (with the exception of a corporate/intranet environment) should fail and/or lie to defeat spammers.

like image 161
Spence Avatar answered Sep 20 '22 12:09

Spence