Adding Email Recipients in CC or BCC

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 04:06 AM
Hi Team,
Can you please help me the below requirement, we are sending an email notifications to customer through event queue, event is fired through business rule, now we want want the some of the users in CC or BCC, how can we add the users in CC when we are sending email to event queue??
Regards,
Prudhvi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 04:24 AM
You could pass the IDs of the extra recipients as a parameter in your gs.EventQueue() call and then use the methods of the Mail Script API to retrieve that information in a mail script and add recipients to Cc or Bcc as needed using addAddress() method.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 05:44 AM
Hi,
You can write notification email script like this
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var user = new GlideRecord("Query your table");
user.addQuery("Apply filter");
user.query();
while(user.next()){
email.addAddress("bcc",user.getValue('email_address'),user.getValue('name'));
email.addAddress("cc",user.getValue('email_address'),user.getValue('name'))
}
})(current, template, email, email_action, event);
add this mail script into your notification
Please mark as correct/helpful, If you find any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2021 01:34 AM
Hello @A prudhvi raj
Thanks for marking as helpful
Can you please mark as correct my reply, If you find a solution
So that in future same thread will utilize to other use may have same query