Forum Discussion
User notes that they can print and email
Hello all,
I'm having issues trying to get the email to be sent. I have followed Stephanie's example and tried some of the later suggestions by Matthew, but for some reason my LMS does not want to open a new window and to sent the e-mail. Can anybody help, please? Here is the code I'm trying to use:
var player = GetPlayer();
var useremail = player.GetVar('EmailN');
var pnotes1 = player.GetVar('Notes1');
var pnotes2 = player.GetVar('Notes2');
var pnotes3 = player.GetVar('Notes3');
var pnotes4 = player.GetVar('Notes4');
var pnotes5 = player.GetVar('Notes5');
var pnotes6 = player.GetVar('Notes6');
var pnotes7 = player.GetVar('Notes7');
var subject = 'Notes from Your Dissertation Topic Tutorial';
var emailBody = 'Research:' + pnotes1 + '\n' + 'Two Important Questions:' + pnotes2 + '\n' + 'What is a research question:' + pnotes3 + '\n' + 'Why is a research question needed:' + pnotes4 + '\n' + 'How and Why:' + pnotes5 + '\n' + 'Answering Why X should be done:' + pnotes6 + '\n' + 'A good research question:' + pnotes7;
var mailto_link = 'mailto:' + useremail + '?subject=' + subject + '&body=' + encodeURIComponent(emailBody);
win = window.open(mailto_link, 'emailWin');
Thanks!
Related Content
- 9 months ago
- 7 months ago
- 8 months ago
- 9 months ago
- 12 months ago