电子邮件地址可以包含国际(非英语)字符吗?
如果可能的话,我是否应该接受用户发来的此类电子邮件?当我向此类地址发送邮件时会出现什么问题?
If it's possible, should I accept such emails from users and what problems to expect when I will be sending mails to such addresses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
正式按照 RFC 6532 - 是。
如需快速解释,请查看有关该主题的维基百科。
Officially, per RFC 6532 - Yes.
For a quick explanation, check out wikipedia on the subject.
2015 年更新:使用 RFC 6532
实验性 5335 已被废弃: 6532 和
后者已设置为“类别:标准轨道”,
使其成为标准。
第 3.2 节(RFC 5322) 已将大多数文本字段更新为
包含(正确的)UTF-8。
请注意显式包含域。
并显式排除标头名称。
另请注意NFKC:
以及第 3 节开始:
Update 2015: Use RFC 6532
The experimental 5335 has been Obsoleted by: 6532 and
this later has been set to "Category: Standards Track",
making it the standard.
The Section 3.2 (Syntax Extensions to RFC 5322) has updated most text fields to
include (proper) UTF-8.
Please note the explicit inclusion of Domains.
And the explicit exclusion of header names.
Also Note about NFKC:
And Section 3 start:
问题是,某些邮件客户端(服务器工具和/或桌面工具)不支持它,并在您尝试将邮件发送到包含变音符号的地址时抛出“无效电子邮件”异常。
如果您想要全面支持,您可以将电子邮件地址部分转换为“punycode”。 这允许用户以通常的方式输入他们的地址,但您可以以支持级别的方式保存它。
示例:müller.com » xn--mller-kva.com
两者都指向同一事物。
The problem is that some mail clients (server-tools and / or desktop tools) don't support it and throw an 'invalid email' exception when you try to send a mail to an address which contains umlauts for example.
If you want full support, you could do the trick with converting the email-address parts to "punycode". This allows users to type in their addresses the usual way but you save it the supported-level way.
Example: müller.com » xn--mller-kva.com
Both points to the same thing.
我认为是的,因为许多顶级域已经允许非 ascii
域的字符,并且由于域是电子邮件地址的一部分,因此它是
完全有可能。 此类域名的一个示例是 www.öko.de
I would assume yes since a number of top level domains already allow non ascii
characters for domains and since the domain is part of an email address, it's
perfectly possible. An example for such a domain would be www.öko.de
简短的回答:是的,
不仅在用户名中而且在域名中都是允许的。
short answer: yes
not only in the username but also in the domain name are allowed.
答案是肯定的,但是它们需要特殊编码。
看看这个。 阅读涉及电子邮件标头和 RFC 2047 的部分。
The answer is yes, but they need to be encoded specially.
Look at this. Read the part that refers to email-headers and RFC 2047.
还没有。 IEEE 计划这样做:
H-在线文章:IEFT规划国际化电子邮件地址,这里是 RfC:国际化电子邮件地址的 SMTP 扩展
引自 H-Online(当它被删除时):
Not yet. The IEEE plans to do this:
H-Online article: IEFT planning internationalised email addresses, here is the RfC: SMTP Extension for Internationalized Email Addresses
Quote from H-Online (as it went down):