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
Add option to bypass SMTPUTF8 #4
Conversation
Allows email clients to send SMTPUTF8 only for messages where it is required.
@agronholm any thoughts on this PR? |
Sorry, I'll try to get to this over the coming weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some style nits, one actual behavior change request.
src/smtpproto/protocol.py
Outdated
@@ -100,7 +101,8 @@ def _encode_address(self, address: Union[str, Address]) -> bytes: | |||
except UnicodeEncodeError: | |||
raise SMTPProtocolViolation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be able to tell which one caused the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point, thank you. I've added different cases for both of these.
Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
@agronholm thanks for the review! I've adopted all suggestions, let me know if I missed anything. I think the test failures are an issue with recent |
Pin the aiosmtpd test dependency to the latest version where the tests pass. I'll try to deal with it later. |
Temporary workaround for an issue binding to port 0
Thanks! |
Allows email clients to send SMTPUTF8 only for messages where it is required.
Should address #3.