Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #6 and one other error #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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