一个电子邮件地址可以包含国际(非

如果可能的话,我是否应该接受用户发送的这些电子邮件,以及当我将邮件发送到这些地址时会遇到什么问题?


官方根据RFC 6532 - 是的

为了快速解释,请查看关于这个主题的维基百科。


更新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.

请注意明确包含域名。
并明确排除标题名称。

另请注意NFKC:

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.

第3节开始:

Also note that messages in this format require the use of the
SMTPUTF8 extension [RFC6531] to be transferred via SMTP.

问题是,当您尝试将邮件发送到包含元音变音器的地址时,某些邮件客户端(服务器工具和/或桌面工具)不支持它并发出“无效电子邮件”异常。

如果你想全力支持,你可以把电子邮件地址部分转换为“punycode”。 这允许用户以通常的方式键入他们的地址,但是您可以通过支持级别的方式保存地址。

例如:müller.com»xn--mller-kva.com

两者都指向相同的东西。

链接地址: http://www.djcxy.com/p/16581.html

上一篇: Can an email address contain international (non

下一篇: C# Email Address validation