Filling emails with java and variables

May 30, 2019

Just a quick question about this. I have some code to send and fill emails with results from a quiz but due to reasons i can't test it at the moment. My question is, is it just a case of using %variablename% in the var body section or do I need to do something else first? 

I have this page ( and a few old threads but couldn't see and answer.

Any advice massively appreciated.

1 Reply
Bruce French

Ok, let me see if i get this

var fbk = player.GetVar('Feedback');

var fbk is what the javascript will know the variable as, fbk?

= player.GetVar is standard and telling it to get the variable?

('Feedback') is what the variable is called in storyline?

So I would have

var user = player.GetVar ('User')

var userid= player.GetVar ('UserSID')

and so on to get all my variables in? and then + them all in the email body.

I'm told I can fill the email body with a html table which is what i want to do so would it just be a case of using the fbk (or whatever it is) in the table cell. Do I need to bracket it somehow?

Thanks for the help.

/additional maybe helpful info. the javascript has been done by a guy in my office and isn't the cut and paste example from sl or your site (which is super helpful btw) and should be interacting with an email system on the server to fill and send the email automatically.

This discussion is closed. You can start a new discussion or contact Articulate Support.