Question

I have the following html form...

<form id="mform"  method="get" enctype="text/plain">
<input name="firstname" type="text" id="firstname">
<input type="submit" class="submit-sponsor-btn" name="submit" value="Submit"  onclick="javascript:doMailto(); return false;" id="submit">
</form>

and my javascript looks like this...

var msubject = "Become an sponsor to start your connection to future talent";
var mfirstname = $('#firstname').val();
var mbody = "<h1>Sponsor Information Below:</h1><p>Firstname:"+mfirstname + "</p>";
var sMailto = "mailto:memail@something.com?subject="+ msubject + "&body="+ mbody;

 function doMailto() {
      window.open(sMailto);
   }

What do I need to do with this code, to enable HTML tags to be rendered within the e-mail? Because as of right now, it simply shows the element tags along with the content.

Thanks for any advice!

Was it helpful?

Solution

You can set the Mail Content Mime-type to be HTML, the page will be rendered. This would work only if the content is generated from server-side.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top