Public Sub Example()
Dim emailValidator As EmailValidation = New EmailValidation() 'Trial Mode
'Dim emailValidator As EmailValidation = New EmailValidation("place user name here", "place license key here") 'License Mode
emailValidator.FromEmail = "someone@somewhere.com"
emailValidator.FromMailServer = "mail.somewhere.com"
'Attach Events
AddHandler emailValidator.ResponseReceivedEvent, AddressOf ResponseReceivedEvent
emailValidator.ValidEmailAsync("1", "johnsmith@hotmail.com")
'Wait until finished
Do While emailValidator.IsBusy
System.Threading.Thread.Sleep(100)
Loop
'Remove the event connections
RemoveHandler emailValidator.ResponseReceivedEvent, AddressOf ResponseReceivedEvent
End Sub
Public Sub ResponseReceivedEvent(ByVal sender As Object, ByVal result As Result)
If result.IsValid Then
'Do something
Else
'Do something else
End If
Console.WriteLine(result.Log)
End Sub