Use*_*ser 77 email internationalization non-english
如果有可能,我是否应该接受用户发送的此类电子邮件以及我将邮件发送到此类地址时会遇到哪些问题?
小智 23
2015年更新:使用RFC 6532
实验5335已被废弃:6532,
后来被设置为"类别:标准轨道",
使其成为标准.
在3.2节(语法扩展到RFC 5322)已经更新了大多数文本字段
包括(适当的)UTF-8.
The following rules extend the ABNF syntax defined in [RFC5322] and
[RFC5234] in order to allow UTF-8 content.
VCHAR =/ UTF8-non-ascii
ctext =/ UTF8-non-ascii
atext =/ UTF8-non-ascii
qtext =/ UTF8-non-ascii
text =/ UTF8-non-ascii
; note that this upgrades the body to UTF-8
dtext =/ UTF8-non-ascii
The preceding changes mean that the following constructs now
allow UTF-8:
1. Unstructured text, used in header fields like
"Subject:" or "Content-description:".
2. Any construct that uses atoms, including but not limited
to the local parts of addresses and Message-IDs. This
includes addresses in the "for" clauses of "Received:"
header fields.
3. Quoted strings.
4. Domains.
Note that header field names are not on this list; these are still
restricted to ASCII.
Run Code Online (Sandbox Code Playgroud)
请注意明确包含域名.
并明确排除标题名称.
The UTF-8 NFKC normalization form SHOULD NOT be used because
it may lose information that is needed to correctly spell
some names in some unusual circumstances.
Run Code Online (Sandbox Code Playgroud)
和第3节开始:
Also note that messages in this format require the use of the
SMTPUTF8 extension [RFC6531] to be transferred via SMTP.
Run Code Online (Sandbox Code Playgroud)
问题是,当您尝试将邮件发送到包含变音符号的地址时,某些邮件客户端(服务器工具和/或桌面工具)不支持它并抛出"无效电子邮件"异常.
如果您需要完全支持,您可以将电子邮件地址部分转换为"punycode".这允许用户以通常的方式键入他们的地址,但是您以支持级别的方式保存它们.
示例:müller.com»xn--mller-kva.com
两者都指向同一件事.
| 归档时间: |
|
| 查看次数: |
55299 次 |
| 最近记录: |