1function sendMail() {
2 var link = "mailto:me@example.com"
3 + "?cc=myCCaddress@example.com"
4 + "&subject=" + encodeURIComponent("This is my subject")
5 + "&body=" + encodeURIComponent(document.getElementById('myText').value)
6 ;
7
8 window.location.href = link;
9}
10
1<textarea id="myText">
2 Lorem ipsum...
3</textarea>
4<button onclick="sendMail(); return false">Send</button>
5