Skip to content

Conversation

@dancysoft
Copy link

If delivery failed due to a SMTPNotSupportedError exception, the
exception handler in _deliver would try to invoke the decode() method
on the class object, resulting in a cascading error. This commit
fixes that problem.

If delivery failed due to a SMTPNotSupportedError exception, the
exception handler in _deliver would try to invoke the decode() method
on the class object, resulting in a cascading error.  This commit
fixes that problem.
Using mailproxy with Python 3.7+ results in the following error
when s.starttls() is called:
ValueError: server_hostname cannot be an empty string or start with a leading dot.

The workaround for this problem is to pass the target host and port to
the smtplib.SMTP() or smtplib.SMTP_SSL() constructors.
@dancysoft dancysoft changed the title Avoid cascading error on SMTPNotSupportedError Fix for issue #6 and one other error Jan 30, 2022
Avoid a cascading error by catching and ignoring
smtplib.SMTPServerDisconnected error when processing the 'finally'
clause of MailProxyHandler._deliver().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant