Add User in CC of an email

may13
Tera Contributor
Hello,
I have a requirement in my current project where I need to create an email script in ServiceNow. In the User table, I have three custom fields: L1 Approval, L2 Approval, and HR Employee. I need to include the users from these fields in the CC section of a notification. Could you please provide the email script?

 

11 REPLIES 11

Aditya_hublikar
Kilo Sage

Hello @may13 ,

 

 

This is syntax for adding users in cc section using email script :

//email.addAddress(type, address, displayname);
email.addAddress("cc","john.copy@example.com","John Roberts");
email.addAddress("bcc","john.secret@example.com","John Roberts");

 

You can also refer following documentation which provide more details about email scripting :

https://www.servicenow.com/docs/bundle/zurich-platform-administration/page/script/server-scripting/r... 

 

https://www.servicenow.com/docs/bundle/zurich-platform-administration/page/script/server-scripting/c... 

 

I have also attaching one demo email script please refer that :

 

adityahubli_0-1768913016947.png

 

adityahubli_1-1768913174864.png

 

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya,

technical Consultant

 

 

Hello @may13 ,

 

If my response helps you then mark it as helpful and accept as solution.

Regards,

Aditya,

Technical; Consultant