EmailAddressValidatorErrorOccurred Event |
Namespace: MailBee.AddressCheck
When MailBee encounters any error, it throws the MailBeeException. However, in most cases MailBee itself traps this exception. For instance, if connecting to a certain SMTP server or making DNS MX lookup fails for a certain domain, MailBeeException is thrown and then trapped by MailBee itself, but no exception will be thrown to the application code. Instead, MailBee understands that the given e-mail address is invalid, and continues. Such errors are called warnings.
ErrorOccurred event allows the developer to track both warnings and critical errors because it's raised for a particular exception even if MailBee will trap this exception and do not pass it to the application code.
Note that not any occurrence of this event indicates that some e-mail address was considered invalid. For instance, if test SMTP connection to a primary SMTP MX server of some e-mail domain failed, this will raise ErrorOccurred event. But if this domain has secondary SMTP MX, MailBee will then try it too, and it the connection succeeds, the e-mail address will be considered OK.
Thus, ErrorOccurred event is mainly intended for informational and debugging purposes.