本文介绍了“MailTo” ...在收件人上设置一个正确的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



类似于:

$ b

如何在HTML中设置收件人的专用名称
$ b

  mailto:John Wayne([email protected])?subject .. 

我怎么做到这一点??

code> mailto:链接,,说这个:

在该定义下,不能包含专有名称。



但RFC的 mailto:部分1738被,它允许(除其他外,包括预定义的主题行) 邮箱规范 - 其中包含专有名称。



[2016-05-31] DavidBalažic在评论中指出,RFC 2368反过来被。从第9部分,RFC 2368的主要变化:

在实际使用中, mailto:Fred Foo< [email protected]> ; 似乎仍然有效,但没有官方支持;您可能还必须对空间进行编码,即 , mailto:Fred%20Foo< [email protected]> ,和/或将名称在引号中, , mailto:Fred Foo< [email protected]> 。


How do I set a proper name for the recipient when in HTML I want to use the "mailto" tag.

Something like:

mailto:"John Wayne([email protected])?subject..

How do I achieve that ??

解决方案

The original standard for mailto: links, RFC 1738, says this:

Under that definition, no proper name could be included.

But the mailto: section of RFC 1738 has been superseded by RFC 2368, which allows (among other things, including predefined subject lines) for an RFC 822 mailbox specification—which includes a proper name.

[2016-05-31] As David Balažic points out in a comment, RFC 2368 is in turn obsoleted by RFC 6068. From Section 9, "Main Changes from RFC 2368":

In actual use, mailto:Fred Foo<[email protected]> still seems to work, but it’s not officially supported; you may also have to encode the space, i.e., mailto:Fred%20Foo<[email protected]>, and/or put the name in quotes, i.e., mailto:"Fred Foo"<[email protected]>.

这篇关于“MailTo” ...在收件人上设置一个正确的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 20:32