Parsing %Results.ScorePoints% into the body of an email

Apr 26, 2021

Hi,

I have JavaScript creating an email and populating it with the required data, but i cannot get my %Results.ScorePoints% into the body block at all, has anyone managed to do this? I have the following working so far:

 

var player = GetPlayer();

var email = player.GetVar("supemail")

var emailTwo = "testing@test.com"

var subject = 'Testing Testing Assessment';

var emailBody = 'Congratulations on completing the Testing Testing Assessment:' + '\n' + '\n' + 'Your score is: ' ;

var mailto_link = 'mailto:' + email + ';' + emailTwo + '?subject=' + subject + '&body=' + encodeURIComponent(emailBody);

win = window.open(mailto_link, 'emailWin');

 

I have tried a variety of ways to get the score in but can't.

Thanks,

Karl W

3 Replies