email@"happy@guy.com" 是一个有效的电子邮件地址吗?

Cor*_*ein 5 email

这条评论让我看到RFC 5322 § 3.4.1,内容如下:

An addr-spec is a specific Internet identifier that contains a locally
interpreted string followed by the at-sign character ("@", ASCII value
64) followed by an Internet domain. 

The locally interpreted string is either a quoted-string or a dot-atom.

If the string can be represented as a dot-atom (that is, it contains no
characters other than atext characters or "." surrounded by atext  
characters), then the dot-atom form SHOULD be used and the quoted-  
string form SHOULD NOT be used.  Comments and folding white space   
SHOULD NOT be used around the "@" in the addr-spec.
Run Code Online (Sandbox Code Playgroud)

我们可以看到什么atext这里

atext           =       ALPHA / DIGIT / ; Any character except controls,
                        "!" / "#" /     ;  SP, and specials.
                        "$" / "%" /     ;  Used for atoms
                        "&" / "'" /
                        "*" / "+" /
                        "-" / "/" /
                        "=" / "?" /
                        "^" / "_" /
                        "`" / "{" /
                        "|" / "}" /
                        "~"
Run Code Online (Sandbox Code Playgroud)

将所有这些放在一起,是否意味着电子邮件地址email@"happy@guy.com"实际上是一个有效地址,因为引号允许使用该@符号?

Ƭᴇc*_*007 11

不,这是无效的。

后面的部分@是域(在您的示例中为“happy@guy.com”)。

您不能拥有带有@符号的域名。

域名的有效字符是什么,可以使用多长时间?

另请查看RFC 1035 2.3.1

它们必须以字母开头,以字母或数字结尾,并且只有字母、数字和连字符作为内部字符

更多信息:

  • 有时您可以解决这个问题,因为电子邮件地址输入错误验证器位于实际网页上,然后您可以使用诸如 firebug 或 webscarab 之类的东西来编辑不正确验证内容的脚本。虽然很烦人。 (2认同)

归档时间:

查看次数:

613 次

最近记录:

12 年,4 月 前