我需要在Mailto link我的网站上创建一个包含产品名称或产品页面网址的网站subject section.我该怎么做?
Exp:当您收到eBay有关您正在销售或购买的产品的电子邮件时,您会通过查看主题部分中的产品名称自动了解该电子邮件的产品.
我怎样才能做到这一点?
Sam*_*son 54
<a href="mailto:example@foo.com?subject=hello world">Email Me!</a>
Run Code Online (Sandbox Code Playgroud)
互联网档案:
相关的Stackoverflow问题:
小智 10
在我没有url编码值之前我遇到了这个问题,所以我建议(使用lc的例子):
<a href="mailto:foo@bar.com?subject=This+Is+My+Product">
Run Code Online (Sandbox Code Playgroud)
要么
<a href="mailto:foo@bar.com?subject=This%20Is%20My%20Product">
Run Code Online (Sandbox Code Playgroud)
此页 [Link Dead]概述了 mailto URI 的语法:
将邮件地址发送给多个收件人
, (comma separating e-mail addresses)
Run Code Online (Sandbox Code Playgroud)在“主题”字段中添加条目
subject=Subject Field Text
Run Code Online (Sandbox Code Playgroud)在“复制到”或“抄送”字段中添加条目
cc=id@internet.node
Run Code Online (Sandbox Code Playgroud)在“密件抄送至”或“密件抄送”字段中添加条目
bcc=id@internet.node
Run Code Online (Sandbox Code Playgroud)在“正文”字段中添加条目
body=Your message here
Within the body use "%0A" for a new line,
use "%0A%0A" for a new line preceded by a blank line (paragraph),
Run Code Online (Sandbox Code Playgroud)您正在寻找的是:
<a href="mailto:foo@bar.com?subject=This Is My Product">
Run Code Online (Sandbox Code Playgroud)
+请注意,使用 a或 a对空格进行 URL 编码可能是个好主意%20:
<a href="mailto:foo@bar.com?subject=This+Is+My+Product">
Run Code Online (Sandbox Code Playgroud)