(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template, /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action, /* Optional GlideRecord */ event) { var rmb = new global.RenderMai

rob125
Tera Contributor

Greetings Everyone, I've been messing around with this for a few hours, it's starting to drive me nuts.  Can someone be so kind as to tell me how I can have text in the Body of the Outlook message this script below will open when the icon is clicked.

Thanks

Robert

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var rmb = new global.RenderMailtoButton();
var img = "reject.png";
var response = "reject";
template.print(rmb.renderMailtoButton(img,response,'100px'));
})(current, template, email, email_action, event);

6 REPLIES 6

amaradiswamy
Kilo Sage

Hi,

Do you want  to open a new email message upon click of the icon or wanted to redirect user to a web page?. if you want to open a new page, then you have to use mailto: or if you want to have a hyperlink then you have to use anchor tags in html

rob125
Tera Contributor

Right now, That script will open a new email message and populate the Subject, but I'm having issues having it place text in the Body. thanks

Hi,

You may try something like below

<a href="mailto:someone@example.com?Subject=Hello%20again&body=Your%20suggestions%20are%20really%20important" target="_top">Send Mail</a>

 

If possible, please share your script and what exactly the issue

rob125
Tera Contributor

The script I'm using is below, everything works, just having a hell of time figuring out how to populate text in the body of the email that opens open.

 

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var rmb = new global.RenderMailtoButton();
var img = "reject.png";
var response = "reject";
template.print(rmb.renderMailtoButton(img,response,'100px'));
})(current, template, email, email_action, event);