当我使用mailto:时,是否可以设置电子邮件的主题/内容?


当前回答

<a href="mailto:manish@simplygraphix.com?subject=Feedback for 
webdevelopersnotes.com&body=The Tips and Tricks section is great
&cc=anotheremailaddress@anotherdomain.com
&bcc=onemore@anotherdomain.com">Send me an email</a>

您可以使用此代码设置主题,正文,抄送,密件

其他回答

我把它分成几行,让它更容易读。

<a href="

    mailto:johndoe@gmail.com

    ?subject=My+great+email+to+you

    &body=This+is+an+awesome+email

    &cc=janedoe@gmail.com

    &bcc=billybob@yahoo.com

">Click here to send email!</a>

您可以使用以下任何一种方式向mailto命令添加已添加的主题。 将?subject outmailto添加到mailto标签。

<a href="mailto:test@example.com?subject=testing out mailto">First Example</a>

我们还可以将文本添加到消息体中,方法是在标记的末尾添加&body,如下面的示例所示。

 <a href="mailto:test@example.com?subject=testing out mailto&body=Just testing">Second Example</a>

除正文外,用户还可以输入&抄送或&密件抄送来填写抄送和密件抄送字段。

<a href="mailto:test@example.com?subject=testing out mailto&body=Just testing&cc=test1@example.com&bcc=test1@example.com">Third
    Example</a>

如何添加主题到邮件标签

是的,你可以这样做:

mailto: email@host.com?subject=something
<a href="mailto:manish@simplygraphix.com?subject=Feedback for 
webdevelopersnotes.com&body=The Tips and Tricks section is great
&cc=anotheremailaddress@anotherdomain.com
&bcc=onemore@anotherdomain.com">Send me an email</a>

您可以使用此代码设置主题,正文,抄送,密件

mailto:joe@company.com?subject=Your+subject