code_junkie

Email SMTP validator

Nov 10th, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // Create a new instance of the EmailValidator class.
  2. EmailValidator em = new EmailValidator();
  3. em.MessageLogging += em_MessageLogging;
  4. em.EmailValidated += em_EmailValidationCompleted;
  5. try
  6. {
  7. string[] list = new string[3] { "[email protected]", "[email protected]", "[email protected]" };
  8. em.ValidateEmails(list);
  9. }
  10. catch (EmailValidatorException exc2)
  11. {
  12. Console.WriteLine("EmailValidatorException: " + exc2.Message);
  13. }
  14.  
  15. // Create a new instance of the EmailValidator class.
  16. EmailValidator em = new EmailValidator();
  17. em.MessageLogging += em_MessageLogging;
  18. em.EmailValidated += em_EmailValidationCompleted;
  19. try
  20. {
  21. string[] list = new string[3] { "[email protected]", "[email protected]", "[email protected]" };
  22. em.ValidateEmails(list);
  23. }
  24. catch (EmailValidatorException exc2)
  25. {
  26. Console.WriteLine("EmailValidatorException: " + exc2.Message);
  27. }
Add Comment
Please, Sign In to add comment