Subject: EmailValidator passes invalid emails even Syntax
Date: 2014-08-04 01:16:59
From: Brett Wass
Source: emailvalidator-passes-invalid-emails-even-syntax


I am sure I am doing something wrong but I have an application which acts as an interface between two systems and we want to validate the email addresses being passed.  Initially we just want to validate for syntax (e.g. is valid but is not) however the Email Validator passes any input as valid.

Here is the code I am executing...

[code lang='c#']
      static void Main(string[] args)
            EmailValidator ev = new EmailValidator();
            ev.ValidationLevel = ValidationLevel.Syntax;
            ValidationLevel evResult = ev.Validate("bad email address");
            Tools.ConsolePauseForKeyPress("Press any key...");
And the result I always get is Syntax.  Am I missing something?  How do I just validate an email address based on Syntax?

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index