email recipient name in email body .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 02:55 AM
how to get email recipient name in email body .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 03:04 AM
it is easy as if you are doing this through triggering event and select event parm1 and parm2 as recipient's. Then add email script inside write
template.print(event.parm1);
template.print(event.parm2);
And call that email script in message body.
If notification is triggering on insert or update on record and recipient's is from fields(for example assigned to and requester are recipient's )
add those fields in body like reciepients - ${assignted_to.email},${requested_for.email} // these will change based on your field backend names
If it is hard coded group or users hard code them in body also
If it is complicated write email script and recipient's list with you logic and call email script in body.
If you want can help with any script.
Thanks,
Bharath
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 04:49 AM
hi @BharathChintala ,
thanks fo rthese help , i have on more query like - i need to send mail to all user individually , which i am getting from catalog form variables(type list collector) so when i am getting the values its sending mail to everyone at a time , i need to send mail one by one . below is my script ..
var arry = [];
arry = [current.variables.{variable_name}];
for (var i = 0; i <= arry.length; i++) {
gs.eventQueue('{event_name}', current, arry[i]);
}
}
please advise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 08:09 AM
@bala_1312 replace this
var list = current.variables.variable_name;
var all = list.split(',');
for (var i = 0; i <= all.length; i++) {
gs.eventQueue("EventName",current,all[i], "");
}
Thanks,
Bharath
Bharath Chintala

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 03:10 AM
Hi @bala_1312
Use the below link to do it in a dynamic way to as many people at a time upon your requirement.
If you are triggering it via events then you can pass it as a parameter and use it in email scripts
Event trigger : gs.eventQueue("EventName",grObj,"input1@gmail.com", "input2@gmail.com");
This will be auto added to your message body, in message body you need to write below syntax and call email script
${mail_script:scriptName}
In email script
template.print(event.parm1); // this will give you input1@gmail.com
template.print(event.parm2); // this will give you input2@gmail.com
This will be auto added to your message body, in message body you need to write
${mail_script:scriptName}
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.