user
@paulmoody1
I want the email also sent to the person taking the quiz.
In Storyline, I have created a registration page using text boxes, and a quiz. I want a copy of the quiz results to also be sent to the learner.

The variable for storing the email is %email%.

Can this be achieved?

thanks in advance!
reply
Reply
user
@support
Yes, if you call the same javascript function EmailMessage() but this time with he the learner's email in the first parameter, then the email will be sent to the learner's address.
reply
Reply
user
@paulmoody1
So, I can use the variable stored in Storyline?

When the learner clicks on a button,

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

I have tried this out and I used my own email as the test, I did not receive an email though.

reply
Reply
user
@support
Yes, accessing variables through the player is how Storyline works, this should be fine. It doesn't work because the widget with the id you're showing in your example doesn't exist. When you save a new email widget, you will receive a unique code. That's the code you need to use in your projects.
reply
Reply
user
@paulmoody1
EmailMessage('paul.moody@winslow.com.au',
'MjIyfDM3MDV8Nzk2ODY4YmEzMzQ5NzI4ODcxN2JkNmRmZTQwOWI4YjQ');

Understand, thanks, I have it working now, but how and where do I add the line to send another email to the variable named email? I've added another trigger to do it, but that didn't work, think I'm going to have to send the email to an inbox and set up rules to send it on to the learner as well.
reply
Reply
user
@support
The way you had it:
var player=GetPlayer();
EmailMessage(player.GetVar('email'), 'MjIyfDM3MDV8Nzk2ODY4YmEzMzQ5NzI4ODcxN2JkNmRmZTQwOWI4YjQ');
looks fine and should work (as long as there's a variable email and it contains a valid email address).

It didn't work previously because you had an incorrect id (the MjlyfD... string) in your code.
reply
Reply