Created
March 22, 2013 13:34
-
-
Save wpsmith/5221305 to your computer and use it in GitHub Desktop.
Creates New Email with To, Subject, and basic body text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var player = GetPlayer(); | |
var email = player.GetVar("ManagerEmail"); | |
var name = player.GetVar("Name"); | |
var texto = player.GetVar("Commitment") + "\n"; | |
var subject = "My Corporate Responsibility Commitment"; | |
var body_start = "Dear Manager,\n" + name + " has sent you his/her Corporate Responsibility Commitment:\n"; | |
var body_end = "Please discuss this commitment with " + name + "\n"; | |
var mailto_link = 'mailto:' + email + '?subject=' + subject + '&body=' + encodeURIComponent(body_start + texto + body_end); | |
win = window.open(mailto_link, 'emailWin'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment