Use as a button and trigger a mailto when it is clicked

Try this, and tell me if works. (If not, I will delete answer.)

<script>
function sendEmail() 
{
    window.location = "mailto:xyz@yourapplicationdomain.com";
}
</script>
<div onclick="sendEmail();">Send e-mail</div>

It is possible to pass the parameters subject and body, but I think that it is not possible to format the text:

<a href="https://stackoverflow.com/questions/19639900/mailto:xyz@yourapplicationdomain.com?subject=Me&body=Hello!">EMAIL</a>

Leave a Comment