Sending email to a learner

How can I send an email to a learner if I don't know their address in advance?

January 21, 2020, 3:10 pm

Click for thumbs down.0Click for thumbs up.0#1

You can use a text entry field and ask the learner to enter their email address. Then, use the JavaScript trigger to pull the entry from a variable. Here's a Storyline example, and you can do something similar in Captivate, too.

var player=GetPlayer();
EmailMessage(player.GetVar('email'), 'NHwxfGUyM4N2RjMTBkMTNkMDVi');

January 21, 2020, 3:13 pm

Click for thumbs down.0Click for thumbs up.1#2

Hi there, I've tried using your code (above) to be able to collect a learner's email address but I can't get it working.
Here's the code I'm using (below) & EmailInput is the Storyline variable I'm using to collect the email address

var player=GetPlayer();
EmailMessage(player.GetVar('EmailInput'), 'mylongcode');

I've replaced mylongcode here since this is a public forum but I know that bit is working because every time I try it my usage goes up as listed on Cluelabs server - I'm just not getting the email!

Can you help?
Many thanks
Jay

March 26, 2021, 10:27 am

Click for thumbs down.0Click for thumbs up.0#3

Update - I've got it working now. One issue was I was expecting a faster receipt but on one of my test emails there was a delay of 10 mins or so. But the code posted above worked for me. 🙂

March 26, 2021, 11:32 am

Click for thumbs down.0Click for thumbs up.0#4

Thank you for the heads up, Jay. Glad it works now.

March 26, 2021, 12:12 pm

Click for thumbs down.0Click for thumbs up.0#5

Hi team,

I have used the code as described on the tutorial page and the messages above:
var player=GetPlayer();
EmailMessage(player.GetVar('email'), 'MTA4fDI0NzZ8Y2VlOTI3OTdkYjlhNTNjYjIyYmYzNjFmYzFmNGNmMDQ');

Every time I try it my usage goes up as listed on the Cluelabs server - I'm just not getting the email!

Please help!

Thank you

July 21, 2021, 9:48 pm

Click for thumbs down.0Click for thumbs up.0#6

The trigger looks good. I would double-check that the email variable has a valid email address. And also that the messages don't get sent to spam.

July 22, 2021, 8:54 am

Click for thumbs down.0Click for thumbs up.0#7