How do I use Email Validator?
Email Validator can only be used programmatically from a .NET environment, including,
but not limited to, ASP.NET, win forms, console applications, and web services.
Here are two brief examples for using Email Validator from C# and Visual Basic.
For more examples,
[C#]
//set the email address
string EmailAddress = "test@hotmail.com";
//validate
MXValidateLevel level = mx.Validate( EmailAddress , MXValidateLevel.Mailbox );
if( level == MXValidateLevel.Mailbox)
{
Console.WriteLine( "Valid Email Address");
}
else
{
Console.WriteLine( "Not Valid Email Address");
}
[Visual Basic]
'set the email address
Dim EmailAddress As String = "test@hotmail.com"
'validate
Dim level As MXValidateLevel = mx.Validate(EmailAddress, MXValidateLevel.Mailbox)
If level = MXValidateLevel.Mailbox Then Console.WriteLine("Valid Email Address")
Else
Console.WriteLine("Not Valid Email Address")
End If