How can I send an email to a learner if I don't know their address in advance?
Reply
Posted on 3/6/2022
Please type your reply.
@support
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');
Reply
Posted on 3/6/2022
@antoinette
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
Reply
Posted on 3/6/2022
@antoinette
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. :)
Reply
Posted on 3/6/2022
@support
Thank you for the heads up, Jay. Glad it works now.
Reply
Posted on 3/6/2022
@nikhilnangia
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
Reply
Posted on 3/6/2022
@support
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.