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 SMTPUTF8 support #49

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Add SMTPUTF8 support #49

merged 3 commits into from
Aug 1, 2023

Conversation

arnt
Copy link
Contributor

@arnt arnt commented Jan 12, 2023

Hi,

this adds support for SMTPUTF8. The new support is mostly automatic; if send_message detects that sending a message would not work without SMTPUTF8, then it uses SMTPUTF8. And only then.

Until this change, creating an Address would disregard its own parameters
if the first parameter was an Address.
"SMTPUTF8" was used as a standin for "an extension the server does not
support", which did no harm since the test server definitely didn't insert
that, but confused me for a moment, so this commit changes the name of the
unsupported extension to DOES-NOT-EXIST.
SMTPUTF8 requires a parameter on the MAIL FROM command if either the
sender address or any of the recipient addresses require SMTPUTF8.

send_message detects the need for SMTPUTF8 and uses the right parameter
when calling mailfrom. Users who call mailfrom and rcptto themselves must
detect the need for SMTPUTF8 themselves (or else Net::SMTP will act as
if SMTPUTF8 were not required by the message).
@arnt
Copy link
Contributor Author

arnt commented Feb 22, 2023

Hi, have you looked at this PR? net-imap now has excellent UTF8=ACCEPT support, so this is the final piece of the puzzle. If there's anything I could do better or should do differently, let me know.

@tmtm tmtm merged commit f2f6441 into ruby:master Aug 1, 2023
@arnt arnt deleted the smtputf8 branch August 2, 2023 09:42
@arnt
Copy link
Contributor Author

arnt commented Aug 2, 2023

Great. Thanks!

If I tell you that I'm happy that you did it so quickly, you'll probably think I'm being snide. I am happy, though, not snide. That was faster than average and much faster than some I've experienced, so thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants