Adding email addresses from email script to bcc in a notification isn't working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:35 PM
I am trying to add a recipient of an email notification using email script, CC is working fine but Bcc is not working. I am adding a screen short of a sample email notification where a notification get trigger when a user updates an incident form.
************ Email Script***********
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var user = new GlideRecord("incident");
user.addQuery('sys_id', current.sys_id);
user.query();
while (user.next()) {
email.addAddress("cc", "alejandra.prenatt@example.com", "Alejandra Prenatt");
email.addAddress('cc', user.caller_id.email.toString(), user.caller_id.getDisplayValue());
email.addAddress('bcc', user.assigned_to.email.toString(), user.assigned_to.getDisplayValue());
}
})(current, template, email, email_action, event);
0 REPLIES 0