Advanced email validation component for Microsoft .NET
var verifier = new EmailVerifier();
// ...
var result = verifier.Verify("bob@example.com",
VerificationLevel.CatchAll);
if (result.IsSuccess)
{
// The mailbox exists and the server is not a catch-all
}
else
{
switch (result.Status)
{
case VerificationStatus.ServerIsCatchAll:
// The server acts as a catch-all for the requested domain
break;
case VerificationStatus.CatchAllConnectionFailure:
// A network failure happened while performing the catch-all
// test
break;
case VerificationStatus.CatchAllValidationTimeout:
// A timeout occured while performing the catch-all test on
// the server; we need to increase the related settings value
break;
// TODO: Add more cases, if needed
default:
// ...
break;
}
}