redon13
7/13/2016 - 11:41 AM

Sending emails with Javascript source http://stackoverflow.com/questions/271171/sending-emails-with-javascript

/*  The HTML

<textarea id="myText">
    Lorem ipsum...
</textarea>
<button onclick="sendMail(); return false">Send</button>
*/

function sendMail() {
    var link = "mailto:me@example.com"
             + "?cc=myCCaddress@example.com"
             + "&subject=" + escape("This is my subject")
             + "&body=" + escape(document.getElementById('myText').value)
    ;

    window.location.href = link;
}