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

拟墨画扇 提交于 2019-12-12 02:13:47

问题


I am trying to use the mailto in order to put variable values into the body of the email using this code:

<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


回答1:


Here's a solution I found. It uses JavaScript :

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


来源:https://stackoverflow.com/questions/28496309/using-html-mailto-to-send-variable-or-multiple-variable-values-into-the-body-of

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!