Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Adding email addresses from email script to bcc in a notification isn't working

Rupam_1
Tera Contributor

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