Forum Discussion
Creating an email from a slide
Actually I got Chat GPT to write this and it serves my needs:
// Get the value of the LearnerName and LearnerEmail variables from Articulate Storyline
var learnerName = player.GetVar("LearnerName");
var learnerEmail = player.GetVar("LearnerEmail");
// Define other email details
var ccAddress = "steve.nixon@lakesidefamilydental.ca"; // CC recipient email address
var subject = "Regarding your recent inquiry";
var body = "Dear " + learnerName + ",\n\nI hope this email finds you well.\n\n";
var line1 = "This is the first line of additional text.";
var line2 = "This is the second line of additional text.";
var line3 = "This is the third line of additional text.";
var line4 = "This is the fourth line of additional text.";
// Construct the mailto link
var mailtoLink = "mailto:" + encodeURIComponent(learnerEmail) +
"?cc=" + encodeURIComponent(ccAddress) +
"&subject=" + encodeURIComponent(subject) +
"&body=" + encodeURIComponent(body + line1 + "\n" + line2 + "\n" + line3 + "\n" + line4);
// Open the email client
window.location.href = mailtoLink;
- MichaelCohen-d08 months agoCommunity Member
LearnerName and LearnerEmail are my variables