当我运行此代码时,我可以发送电子邮件,但我无法将 HTML 正文加载到电子邮件正文中,请帮助我使用 Javascript 将 html 正文加载到电子邮件正文中。
<script type="text/javascript">
function sendMail() {
var link = 'mailto:hello@domain.com?subject=Message from ' +document.getElementById('email_address').value +'&body='+document.getElementById('email_address').value;
window.location.href = link;
}
</script>
<body>
<form method="post" action="">
<input type="hidden" id="email_address" name="name" placeholder="Enter your email address..." required>
<button onclick="sendMail()">Send Email</button>
<br>
MALE:
<td><input type="checkbox" name="Package" value="yes">Yes </td>
<td><input type="checkbox" name="Package" value="no">No </td>
</form>
</body>