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

Add option to bypass SMTPUTF8 #4

Merged
merged 5 commits into from Apr 15, 2021
Merged

Conversation

cole
Copy link
Contributor

@cole cole commented Jan 10, 2021

Allows email clients to send SMTPUTF8 only for messages where it is required.

Should address #3.

Allows email clients to send SMTPUTF8 only for messages where it is
required.
@cole cole changed the title Add option to bypass SMTPUTF8 option Add option to bypass SMTPUTF8 Jan 11, 2021
@cole
Copy link
Contributor Author

cole commented Apr 2, 2021

@agronholm any thoughts on this PR?

@agronholm
Copy link
Owner

Sorry, I'll try to get to this over the coming weekend.

Copy link
Owner

@agronholm agronholm left a 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 Show resolved Hide resolved
src/smtpproto/protocol.py Outdated Show resolved Hide resolved
@@ -100,7 +101,8 @@ def _encode_address(self, address: Union[str, Address]) -> bytes:
except UnicodeEncodeError:
raise SMTPProtocolViolation(
Copy link
Owner

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.

Copy link
Contributor Author

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.

src/smtpproto/protocol.py Outdated Show resolved Hide resolved
src/smtpproto/protocol.py Show resolved Hide resolved
cole and others added 2 commits April 11, 2021 19:29
Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
@cole
Copy link
Contributor Author

cole commented Apr 12, 2021

@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 aiosmtpd changes, tests pass for me with version 1.2.2. of that package.

@agronholm
Copy link
Owner

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
@agronholm agronholm merged commit a091d7f into agronholm:master Apr 15, 2021
@agronholm
Copy link
Owner

Thanks!

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.

None yet

2 participants