Forum Discussion
Pulling text entries from SL360 and sending via email - Javascript
I've been trying to replicate this same experience (emailing variable content with executed java script) but I cannot get it to work. I get halfway there: I'm able to generate a new browser tab (via each of the below separate sets of java), but no Outlook email generates. Each of them, when tested separately, only opens a Chrome browser tab.
What am I doing wrong? I need it to generate an Outlook email.
var player = GetPlayer();
var email='';
var subject='Tracks Course Notes';
var feedback=player.GetVar('MyNotes');
var emailBody = +feedback
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+encodeURIComponent(emailBody);
win=window.open(mailto_link,'emailWin');
--------------------------
var player = GetPlayer();
var useremail=player.GetVar("Email");
var subject="Tracks Training Notes";
var notes1=player.GetVar("MyNotes");
var content="Tracks Training Notes%0d%0A%0d%0A";
content+=notes1;
var mailto_link='mailto:'+useremail+'?subject='+subject+'&body='+content;
win=window.open(mailto_link,'emailWin');
-------------------------------
var player = GetPlayer();
var email=player.GetVar("Email");
var subject="Tracks Training Feedback";
var body_start=player.GetVar("MyNotes");
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+escape(body_start);
emailwin=window.open(mailto_link,'emailWin');
emailwin=window.close();