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
Posted on 2/27/2023
Please type your reply.
@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
Posted on 2/28/2023
@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
Posted on 3/5/2023
@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.
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
Posted on 3/6/2023
@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.