EmailVerify.NET - Inspect e-mail verification failures in VB.NET
The following example verifies a single e-mail address up to mailbox existence and, should it find the validation
is not successful, it would inspect some of the possible failure types.
Dim verifier = New EmailVerifier()
Dim status = verifier.Verify("address@example.org", VerificationLevel.Mailbox)
If status.IsSuccess Then
Console.WriteLine("Mailbox verification test succeeded!")
Else
' The test failed. Let's see why...
If status.IsSyntaxFailure Then
' The email address is not syntactically valid
' TODO: Discard this address immediately
ElseIf status.IsTimeoutFailure Then
' It failed because of a timeout, thus it could be valid.
' TODO: Save a reference to this address for future retries
ElseIf status.IsNetworkFailure Then
' It failed because of a network failure: chances are high that this address is not valid.
' TODO: Discard this address or save it for future retries
End If
End If