-3

I am making a simple website where we save something by email; i found out how to open the email, but i cant get it to email a specific thing.

this is my code:

     var a = function(){
 b = document.getElementById("email").value;
 m = document.getElementById("Text").value;
window.open("mailto:"+b);
};

I'm trying to make it so it emails m as the body.

Fri Day
  • 11
  • 4

1 Answers1

1

You can add body parameter like this:

window.open("mailto:"+b+"?body="+m);

subject parameter will be useful too

This answer will be helpful.

350D
  • 11,135
  • 5
  • 36
  • 49