Fix: catch SMTPException instead of requiring AUTH extension #6
Loading…
Reference in a new issue
No description provided.
Delete branch "jch/fix-smtp-auth-localhost"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The previous commit used
server.has_ext('AUTH')which doesn't exist onsmtplib.SMTPobjects, causing anAttributeError.This switches the exception from catching only
SMTPAuthenticationErrorto catching allSMTPExceptionsubclasses, allowing auth failure (including when AUTH isn't advertised) to gracefully skip and still send via relay.