Does mail support sending with SMTPUTF8 / Extension for Internationalized Email?
- Dominant language
- Ruby
- Stars
- 3.7k
- Forks
- 934
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I see that parsing RFC6532 Internationalized Email Headers is supported but is it possible to send mail to recipients with non ASCII characters in local part via SMTPUTF8 aka RFC5336 SMTP Extension for Internationalized Email?
It looks like for sending it does encode UTF8 chars to ASCII using MIME encoded-word in the local part of the address but I am still a bit confused as to whether this is what an SMTPUTF8 server expects?
Am I missing a manual encoding I need to specify?
When I try to send email to something like `testö@test.com` via an SMTP relay supporting SMTPUTF8 it rejects with `(555 5.5.2 Syntax error. f205sm86227vka.0 - gsmtp)`
I believe GMAIL SMTP Relay does support Internationalized Email Headers as an EHLO returns
```
250-smtp-relay.gmail.com at your service, [52.91.35.47]\n250-SIZE 157286400\n250-8BITMIME\n250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\n250-ENHANCEDSTATUSCODES\n250-PIPELINING\n250-CHUNKING\n250 SMTPUTF8\n
```
Also gmail web interface is able to successfully send to the exact same email address.
Contributor guide
Research direction
Start by tracing the mail-sending path for an address such as `testö@test.com` and checking how the SMTPUTF8 capability is handled after EHLO. Compare the generated address with RFC5336 expectations and the reported relay rejection. Done means sending to a non-ASCII local part succeeds when the server advertises SMTPUTF8, with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100