Amazon SES - Non - ASCII Characters in e-mail address

4.2k views Asked by At

I'm trying to send an e-mail using Amazon SDK for .NET and SES. I have an e-mail which consists of special letters, for example:

ęxąmplę@źćż.com

For the domain part, i read about Punycode and that works fine. But for the local part of the address, i can't seem to find a solution: I tried using RFC 2047 encoding for whole e-mail, but then SES return 'missing final @ domain' error, so I tried to encode only a local part, so the e-mail would be

=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=@punycodeemail.com

but that didn't seem to work also. Has someone successfuly resolved that?

1

There are 1 answers

1
Martin Brown On BEST ANSWER

So here is what I've found out:

The base SMTP email address specification (RFC 5322 Section 3.4) does not allow email addresses outside a limited subset of the 7-bit ASCII range. In order to support email addresses like the one in the question both the sending and receiving email servers need to support an extension to SMTP called SMTPUTF8 defined in RFC 6531.

According to a conversation I had with Amazon SES's support team SMTPUTF8 isn't widely supported currently (23 Nov 2017) and as such they don't support it either. Their development team is working on it, however they have no idea when, or even if, it will make it to production.

The following comment that is currently in the .Net SDK documentation about MIME Encoding seems to be somewhat of a red herring.

By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047.

Since I chatted to Amazon about this they seem to be correcting some parts of the documentation a better description can be found in the API documentation.

Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the local part of a destination email address (the part of the email address that precedes the @ sign) may only contain 7-bit ASCII characters. If the domain part of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in RFC3492.