Publish to Flash first to get JS email working??

Oct 25, 2021

Trying to get the JS email function to work, I have created a javascript trigger with the simplest possible code, to start an email from SL 360. I tried pasting in the exact code from the help pages (just editing in my email address).

It just does nothing at all, either from Review or when published to web and put onto a server, either on a mac or windows browser. 

I read in a post from a few years ago that someone had this issue, and had to publish to Flash first and then to html5, to get it to work. Can't do that now, but does anyone have any recent experience?

5 Replies
john faulkes

Just some more to report (if you have any patience left).  I started this whole thing earlier today by writing a more involved trigger (which didn't work), before I tried out the simple one. What I've established now is that the presence of the more involved trigger stops the simple one working! I have attached a file, in case anyone can shed any light!

Walt Hamilton

I'm baffled by this, because the scripts are separate scripts, and should not effect one another, but, as they say, "The compiler is what the compiler does."


The third script has a line break after questionnaire, and a mismatched " in the body_start variable.


Here is a version I got to work for me.


var email="";
var subject="Report requested";
var player = GetPlayer();
var body_start="here is a more comprehensive report on this questionnaire"+ player.GetVar("leader_role")+ player.GetVar("effective_communication");
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start;
window.location.href = mailto_link;