<p>I want to create a client side mail creator web page. I know the problems of using the mailto action in an html form (not standard, no default mail appication set on the client). But the web page isn't very important, and they don't care very much.</p>

<p>The mail created by the mailto action has the syntax:</p>

<blockquote>
  <p>subject: undefined subject<br>
  body:</p>
  
  <p>param1=value1<br>
  param2=value2<br>
  .<br>
  .<br>
  .<br>
  paramn=valuen  </p>
</blockquote>

<p>Can I use JavaScript to format the mail like this?</p>

<blockquote>
  <p>Subject:XXXXX</p>
  
  <p>Body:
  Value1;Value2;Value3...ValueN</p>
</blockquote>

[{'answer_id': 7597, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': -1, 'selected': False, 'text': "<p>Is there a reason you can't just send the data to a page which handles sending the mail?  It is pretty easy to send an email in most languages, so unless there's a strong reason to push it to client side, I would recommend that route.</p>\n"}, {'answer_id': 7612, 'author': 'Lars Mæhlum', 'author_id': 960, 'author_profile': 'https://Stackoverflow.com/users/960', 'pm_score': 3, 'selected': False, 'text': '<p>You more or less only have two alternatives when sending mail via the browser..</p>\n\n<ol>\n<li>make a page that takes user input, and allows them to send the mail via your web-server. You need some kind of server-side scripting for this.</li>\n<li>use a mailto: link to trigger opening of the users registered mail client. This has the obvious pitfalls you mentioned, and is less flexible. It needs less work though.</li>\n</ol>\n'}, {'answer_id': 7619, 'author': 'sven', 'author_id': 46, 'author_profile': 'https://Stackoverflow.com/users/46', 'pm_score': 2, 'selected': False, 'text': "<p>With javascript alone, it's <strong>not possible</strong>.<br>\nJavascript is not intended to do such things and is severely crippled in the way it can interact with anything other than the webbrowser it lives in, (for good reason!).  </p>\n\n<p>Think about it: a spammer writing a website with client side javascript which will automatically mail to thousands of random email addresses. If people should go to that site they would all be participating in a distributed mass mailing scam, with their own computer... no infection or user interaction needed!</p>\n"}, {'answer_id': 7643, 'author': 'Vincent Robert', 'author_id': 268, 'author_profile': 'https://Stackoverflow.com/users/268', 'pm_score': 5, 'selected': True, 'text': '<p>What we used in a projet is a popup window that opens a mailto: link, it is the only way we found to compose a mail within the default mail client that works with all mail clients (at least all our clients used).</p>\n\n<pre><code>var addresses = "";//between the speech mark goes the receptient. Seperate addresses with a ;\nvar body = ""//write the message text between the speech marks or put a variable in the place of the speech marks\nvar subject = ""//between the speech marks goes the subject of the message\nvar href = "mailto:" + addresses + "?"\n         + "subject=" + subject + "&amp;"\n         + "body=" + body;\nvar wndMail;\nwndMail = window.open(href, "_blank", "scrollbars=yes,resizable=yes,width=10,height=10");\nif(wndMail)\n{\n    wndMail.close();    \n}\n</code></pre>\n'}, {'answer_id': 28234765, 'author': 'Simon', 'author_id': 487846, 'author_profile': 'https://Stackoverflow.com/users/487846', 'pm_score': 1, 'selected': False, 'text': '<p>You can create a mailto-link and fire it using javascript:</p>\n\n<pre><code>  var mail = "mailto:buddy@mail.com?subject=New Mail&amp;body=Mail text body";  \n  var mlink = document.createElement(\'a\');\n  mlink.setAttribute(\'href\', mail);\n  mlink.click();\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/7592', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/518/']