Skip to main content
Participant
August 22, 2016
Answered

Send an e-mail at the end of Captivate Project

  • August 22, 2016
  • 1 reply
  • 3071 views

Hi all,

Hope someone can assist. I am using Captivate 8, and at the end of a project I would delegates to click on a "send e-mail" button to send an e-mail to my mailbox.

However I would like to add a JavaScript to get the system to send an e-mail with a Subject and body already populated.

All our delegates are internal to our organisation.

I have Googled this query and tried a few options but with no success, so fingers crossed someone out there can help.

David

This topic has been closed for replies.
Correct answer TLCMediaDesign

Enter the course name in the Project Name field:

Execute this JavaScript:

var who = "your email";

var mySubject = encodeURI(window.cpAPIInterface.getVariableValue("cpInfoProjectName") + "  - Badge");

var myBody = encodeURI("I have now completed this module and would like to be awarded with my badge.")

window.open("mailto:"+ who+"?subject="+mySubject+"&body="+myBody);

You could also populate the E-mail field and pull that out of Captivate also:

var who = window.cpAPIInterface.getVariableValue("cpInfoEmail");

var mySubject = encodeURI(window.cpAPIInterface.getVariableValue("cpInfoProjectName") + "  - Badge");

var myBody = encodeURI("I have now completed this module and would like to be awarded with my badge.")

window.open("mailto:"+ who+"?subject="+mySubject+"&body="+myBody);

1 reply

TLCMediaDesign
Inspiring
August 22, 2016

What are you wanting to use as the Subject and Body?

Are you trying to capture Captivate variables?

Are you publishing to HTML5, swf or both?

ScotGov1Author
Participant
August 22, 2016

I want to award Open badges for our events and want the subject to say " Course name - Badge" and the Body text to say " I have now completed this module and would like to be awarded with my badge"

I am not using variables in these project and we publish to both HTLM5 and swf.

David

TLCMediaDesign
TLCMediaDesignCorrect answer
Inspiring
August 22, 2016

Enter the course name in the Project Name field:

Execute this JavaScript:

var who = "your email";

var mySubject = encodeURI(window.cpAPIInterface.getVariableValue("cpInfoProjectName") + "  - Badge");

var myBody = encodeURI("I have now completed this module and would like to be awarded with my badge.")

window.open("mailto:"+ who+"?subject="+mySubject+"&body="+myBody);

You could also populate the E-mail field and pull that out of Captivate also:

var who = window.cpAPIInterface.getVariableValue("cpInfoEmail");

var mySubject = encodeURI(window.cpAPIInterface.getVariableValue("cpInfoProjectName") + "  - Badge");

var myBody = encodeURI("I have now completed this module and would like to be awarded with my badge.")

window.open("mailto:"+ who+"?subject="+mySubject+"&body="+myBody);