Skip to content

2 Ways to Send Email From E-learning Courses Using Articulate Storyline

Do you know that a learner can directly communicate with the training manager from an e-learning course developed in Articulate Storyline?


E-learning industry’s most preferred authoring tool, Articulate storyline, makes this requirement possible in two simple ways. One is through the default trigger and the other is by using JavaScript.

In this post, I would like to share with you all the two ways in detail.

1. Using a Normal Trigger:

In this way, we can send an email with a single trigger. Make sure to provide the destination mail address in the trigger wizard. All we have to do is use Send email to action when the learner clicks on a particular object. Refer to the screenshot given below for better understanding.

Using a Normal Trigger

2. Using JavaScript Code within the Trigger:

The second and the dynamic way enables us to fill all fields dynamically (while viewing the e-learning course) so that we can add different destination mail addresses with different content. Here are the steps to be followed:

1. Create a mail wizard with the required Text Entry fields like destination mail, subject, and body of mail and place the labels describing the same beside the Text Entry fields. The screenshot below shows a clear picture.

Using JavaScript Code within the Trigger

Note: Rename the text entry fields as shown below for easy use.

Using JavaScript Code within the Trigger

2. Now, create three variables to get the values of fields (which the learner types while viewing the course). Here, I have created variables named MailBody to store the body content of mail, subject to store the subject text and tomail to get the destination mail address.


3. Coming to the actions part, set the values of variables equal to the values of their corresponding text entry fields when control loses focus on text entry fields. Have a look at the screenshot below for reference.

Focus on text entry fields

Focus on text entry fields

Focus on text entry fields

4. After setting all the variables, the triggers panel of our storyline looks similar to the screenshot below.

Triggers panel of our storyline

5. The last step is to prompt an action to send the email. This will be done by executing the JavaScript code when the user clicks on the Send Mail button. Paste the code shown below into the trigger.

var player=GetPlayer();
var subjecttxt=player.GetVar(“subject”);
var tomail=player.GetVar(“tomail”);
var bodytxt=player.GetVar(“MailBody”);
var mail_link=’mailto:’+tomail+’?subject=’+subjecttxt+’&body=’+bodytxt;,’emailWin’);

Send Mail button

 6. This will open the installed email program on your system so that we can add attachments, make any changes if required, and finally click on the Send button.

Note 1: Before doing this, make sure that at least one email program was installed your system.

Publish the course to the CD version if you are working on a network.

Please share your feedback, comments, or related information if any.

Authoring Tool Finder - Find the Best Suited Authoring Tool for Your Needs