How to bold text in an email created with Javascript
Oct 11, 2022
Hello All,
Need some assistance from the community in this. I am using Javascript to create an email with the users final score. That part I have working perfectly. What I am trying to do is have the score show as bold in the email body which is passed through as a variable. I have been scouring the internets for days and nothing seems to be doing the trick. Any suggestions?
Here is the working script:
var player = GetPlayer();
var email=player.GetVar("Email");
var subject="Score Results";
var OVERALLTOTAL=player.GetVar("OVERALLTOTAL");
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+"Based on your responses , you scored a " +OVERALLTOTAL+"%0d%0A%0d%0ASave this email to track your results.";
win=window.open(mailto_link,'emailWin');
3 Replies
Hi Mark, this should keep things simple for you. Using this (JavaScript) method, it is not possible to set the text as bold. The email is treated as plain text and not rich text or html.
Hi Sam,
Thanks for the response. That would totally make sense especially considering all of the dead ends I ran into researching this! Appreciate all of the support here!!!!
Glad to hear Sam was able to assist you, Mark!
If you have any other questions, please feel free to reach out in the E-Learning Heroes Community or privately in a support case.
Have a great weekend!