Knowledge base for Cobisi's products and services
Sub Main() Dim verifier = New EmailVerifier() Dim taskGroup = New VerificationTaskGroup() ' Set up some addresses to check and add them to the verification group taskGroup += New VerificationTask("alice@example.com", VerificationLevel.Smtp) taskGroup += New VerificationTask("bob@example.com", VerificationLevel.CatchAll) taskGroup += New VerificationTask("charlie@example.org", VerificationLevel.CatchAll) ' Binds to the event which notifies groups completion AddHandler verifier.VerificationTaskGroupCompleted, AddressOf OnVerificationTaskGroupCompleted ' Binds to the event which notifies single task completion AddHandler verifier.VerificationTaskCompleted, AddressOf OnVerificationTaskCompleted ' Start the batch processing asynchronously verifier.VerifyAsync(taskGroup) ' Not a true multi-threaded application here, we'll block until receiveing console input Console.ReadLine() End Sub Private Sub OnVerificationTaskGroupCompleted(ByVal sender As Object, ByVal args As VerificationTaskGroupCompletedEventArgs) Console.WriteLine("Task group completed.") End Sub Private Sub OnVerificationTaskCompleted(ByVal sender As Object, ByVal args As VerificationTaskCompletedEventArgs) Console.WriteLine("Address {0} => {1}", args.Task.EmailAddress, args.Task.Result) End Sub
Please don't hesitate to contact us if you have problems with any of our products or services; technical support is always free of charge, and requests made by registered clients will have higher priority.