我目前在我的网站上有一个 mailto: 链接,以便用户可以给自己发送电子邮件,但是我正在尝试解决的是如何在他们发送给我的电子邮件中添加强制文本。为了澄清,我希望当他们单击 mailto: 链接时在电子邮件中加载一个句子。
谢谢
mailto: 链接的 html 代码如下
<div align="center"><a href="mailto:[email protected]"><img src="mailimage.png" width="75" height="75"/></a></div>
<a href="mailto:[email protected]?subject=This%20is%20the%20subject&[email protected]&body=This%20is%20the%20body">Send email</a>
正如您所看到的,除了“收件人”地址之外,我们还可以轻松指定:
可以在这里找到相同的最新 RFC:https://www.rfc-editor.org/rfc/rfc6068。 mailto
确保对添加到正文和主题的任何文本进行 URL 编码。
可以在此处找到 在线文本到 URL 编码器。
将 Body 参数添加到您的 mailto url 中:
<div align="center"><a href="mailto:[email protected]?subject=Your_Subject&body=Your_Body_Text"><img src="mailimage.png" width="75" height="75"/></a></div>
此工具对于制作电子邮件链接非常有用:http://angrytools.com/email/
<div align="center"><a href="mailto:[email protected]?body=yourtext"><img src="mailimage.png" width="75" height="75"/></a></div>
在 href 中添加了 body 参数。
?body=yourtext
如何才能包含附件?