* Check the SMTP servers in order of priority instead of random order.
* Handle SMTPServerDisconnected like a 451 status as recommended by RFC
5321.
* Exit early by directly raising CommunicationError on the first 5xx
SMTPResponseException.
See also the discussion at
https://github.com/karolyi/py3-validate-email/discussions/61
Issue our own log messages independently of the "debug" parameter, so a
user can activate our log messages through Python's standard logger
config features, while still having dsabled smtplib's debug messages,
which are very verbose and always go to stderr.
Change the log output for failed and ambiguous verifications from
"warning" to "info" as this is a normal function of the library and not
something that would require attention. Also this makes sure that no log
output is generated if logging is not configured at all (default is to
only display warning and above).
* Improve exception class hierarchy
* Raise exception on malformatted "from_address" parameter instead of
yielding a negative verification result
* Add option to raise exceptions on ambiguous results
* Improve exception parameters to allow for a more structured analysis
of the negative response
* Yield a negative verification result upon the first permanent error on
RCPT TO, just like a mail server would also bounce after the first
permanent error
* Unify error message format, always include SMTP status code
* Use "with SMTP" to properly close connection even in case of error
* Establish connection after setting debug level so this is debugged as
well
* Properly handle SMTP error status codes on connection
* Don't return ambigious SMTP status codes, as they are not used anyway
Two essential changes were made to the process of initially downloading
the blacklist at install time, allowing the removal of a number of hacks
and workarounds:
1. Download the files *after* populating the build directory instead of
*before*. Thus, the files don't have to be included in MANIFEST.in, and
following from that, `setup.py sdist` needn't be tricked into not
including them in the source distribution.
2. Only import the updater module instead of the full validate_email
package, so `setup.py install` and friends don't depend on all the
requirements of the library.
This unifies the tasks of splitting an email address into user and
domain parts as well as converting an international domain name into the
ASCII-compatible encoding (ACE).