添加“Mailto”正文文本的超链接

时间:2015-07-05 09:41:27

标签: url encoding hyperlink

我目前正在使用mailchimp制作电子邮件转发按钮。当您按下此按钮时,会出现一些文本,然后您将其发送给其他人。我使用下面的代码。我希望有一个“www.dailypnut.com”地址的超链接,因为它目前在电子邮件中显示为文本。我该怎么做?

<p style="background-color:#3b5998; width:200px; height:40px;
opacity:0.8;margin:auto;margin-top:15px; margin-bottom;px;
text-align:center;line-height:40px"><a href="mailto:?Subject=The Daily 
Pnut:The World in a Nutshell&amp;Body=%20Sign%20up%20for%20the%20
Daily%20Pnut.%20A%20humorous%20daily%20summary%20of%20world%20affairs
%20-%20www.dailypnut.com" style="text-decoration:none"><b style=
"color:white;text-decoration:none; opacity:0.9;text-transform: uppercase;
font-size:14px">Forward the Pnut!</b></a></p>

1 个答案:

答案 0 :(得分:1)

此行为取决于电子邮件客户端,因此您无法在html中获得此解决方案。

很遗憾,您只能在mailto中指定一个简单的正文(例如参见MailTo with HTML body)。由于今天许多电子邮件客户端只允许编辑html正文,因此在加载时将简单正文“转换”为html,它们很可能在转换期间用链接替换URL。

结果是mailto链接的行为会有所不同,具体取决于用户的电子邮件客户端。