Amazon SES - 电子邮件地址中的非 ASCII 字符
Amazon SES - Non - ASCII Characters in e-mail address
我正在尝试使用适用于 .NET 和 SES 的 Amazon SDK 发送电子邮件。我有一封包含特殊字母的电子邮件,例如:
ęxąmplę@źćż.com
对于域部分,我阅读了有关 Punycode 的内容,它运行良好。但是对于地址的本地部分,我似乎找不到解决方案:我尝试对整个电子邮件使用 RFC 2047 编码,但随后出现 SES return 'missing final @ domain' 错误,所以我试图只对本地部分进行编码,因此电子邮件将是
=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=@punycodeemail.com
但这似乎也不起作用。有人成功解决了吗?
所以这是我发现的:
基地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.
根据我与 Amazon SES 支持团队的对话,SMTPUTF8 目前未得到广泛支持(2017 年 11 月 23 日),因此他们也不支持它。他们的开发团队正在努力,但他们不知道什么时候,甚至是否会投入生产。
当前在 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.
自从我与 Amazon 讨论此事后,他们似乎正在更正文档的某些部分,可以在 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.
我正在尝试使用适用于 .NET 和 SES 的 Amazon SDK 发送电子邮件。我有一封包含特殊字母的电子邮件,例如:
ęxąmplę@źćż.com
对于域部分,我阅读了有关 Punycode 的内容,它运行良好。但是对于地址的本地部分,我似乎找不到解决方案:我尝试对整个电子邮件使用 RFC 2047 编码,但随后出现 SES return 'missing final @ domain' 错误,所以我试图只对本地部分进行编码,因此电子邮件将是
=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=@punycodeemail.com
但这似乎也不起作用。有人成功解决了吗?
所以这是我发现的:
基地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.
根据我与 Amazon SES 支持团队的对话,SMTPUTF8 目前未得到广泛支持(2017 年 11 月 23 日),因此他们也不支持它。他们的开发团队正在努力,但他们不知道什么时候,甚至是否会投入生产。
当前在 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.
自从我与 Amazon 讨论此事后,他们似乎正在更正文档的某些部分,可以在 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.