basically, ive been trying to set up this code for my page, however im struggling as im not the best at javascript. ive tried looking up resources online but none of them seem to help. this is part of a form, i want the users to fill a small form and then, after clicking the button, it should open their mail client with a template. i just need to know how to properly add the information to the javascript, especially how to set up a carbon copy gmail, and if theres anything i should change. i can provide the full form code if needed.
<div class="row">
<input type="submit" value="Enviar." onclick="sendMail(); return false">
</div>
heres the javascript that ive been working with
<script>
function sendMail() {
var link = "mailto:me@example.com"
+ "?cc=myCCaddress@example.com"
+ "&subject=" + encodeURIComponent("This is my subject")
+ "&body=" + encodeURIComponent(document.getElementById('myText').value)
;
window.location.href = link;
}
</script>