- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 11:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 12:00 AM
In the mail script you have to write - if event.parm1 is a JSON string then you can access in the email script like below
var jp = new JSONParser();
event.info = jp.parse(event.parm1);
I have given an example of a way that we follow to pass multiple information in parameters and this can give much more idea for you -
While you are queueing the event, follow this - gs.eventQueue('event', current, parm1, parm2);
1. parm1 contains JSON structure of following format
{
addressedTo : "John",
sendCcList:''abc@123.com",
sendBccList: "123@abc.com"',
}
2. parm2 should have To list of the recipients.
In the email action, check only Event parm 1 cotains recipients check box, uncheck Event parm 2 as recipients check box.
Go to the email scripts tables-
Write a new email script: notification_email_script //you can put any name and its advisable to separate the words with underscore
var jp = new JSONParser();
event.info = jp.parse(event.parm1);
event.addressedTo = event.info.addressedTo;
for (var i=0;i < event.info.sendCcList.length; i++)
email.addAddress("cc",event.info.sendCcList[i]);
for (var i=0;i < event.info.sendBccList.length; i++)
email.addAddress("bcc",event.info.sendBccList[i]);
Go back to the email action -
In the message HTML put the below line at the top-
${mail_script:notification_email_script}
Mark if it is helpful or correct, feedback is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 12:00 AM
In the mail script you have to write - if event.parm1 is a JSON string then you can access in the email script like below
var jp = new JSONParser();
event.info = jp.parse(event.parm1);
I have given an example of a way that we follow to pass multiple information in parameters and this can give much more idea for you -
While you are queueing the event, follow this - gs.eventQueue('event', current, parm1, parm2);
1. parm1 contains JSON structure of following format
{
addressedTo : "John",
sendCcList:''abc@123.com",
sendBccList: "123@abc.com"',
}
2. parm2 should have To list of the recipients.
In the email action, check only Event parm 1 cotains recipients check box, uncheck Event parm 2 as recipients check box.
Go to the email scripts tables-
Write a new email script: notification_email_script //you can put any name and its advisable to separate the words with underscore
var jp = new JSONParser();
event.info = jp.parse(event.parm1);
event.addressedTo = event.info.addressedTo;
for (var i=0;i < event.info.sendCcList.length; i++)
email.addAddress("cc",event.info.sendCcList[i]);
for (var i=0;i < event.info.sendBccList.length; i++)
email.addAddress("bcc",event.info.sendBccList[i]);
Go back to the email action -
In the message HTML put the below line at the top-
${mail_script:notification_email_script}
Mark if it is helpful or correct, feedback is appreciated