简体   繁体   English

使用html mailto将变量或多个变量值发送到电子邮件正文中

[英]Using html mailto to send variable or multiple variable values into the body of the email

I am trying to use the mailto in order to put variable values into the body of the email using this code: 我正在尝试使用mailto,以便使用以下代码将变量值放入电子邮件的正文中:

<p>
This is another mailto link:
<a href="mailto:someone@example.com?cc=someoneelse@example.com&bcc=andsomeoneelse@example.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!" target="_top">Send mail!</a>
</p>

Then I would like the end user to be able to copy and paste those values into excel easily 然后,我希望最终用户能够轻松地将这些值复制并粘贴到excel中

Here's a solution I found. 这是我找到的解决方案。 It uses JavaScript : 它使用JavaScript:

<a href="#" onclick="javascript:window.location='mailto:'+EmailVairable+'?subject='+SubjectVariable+'&cc='+CCvariable+'&bcc='+BCCvariable+'&body='+BodyVariable">Email</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM