- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 06:05 AM
I have written an email script to show a specific email address in CC of emails.
1. I have tried writing gliderecord in the mail script and make the CC in the emails calling the ${mail_script:Add_CC} in notifications
var user = new GlideRecord('sys_user');
user.addQuery("sys_id",'SYS_ID of the user record');
user.query();
while (user.next()) {
email.addAddress('cc', user.email, user.getDisplayValue());
2. I have hard coded the email address and tried adding email address in CC of emails using
email.addAddress("cc", "Email address", "Name");.
Both the results are working for me when I verified in the email logs but when I verified the notifications in outlook, they have received with out setting CC and it is blank.
Need help on how to resolve this issue.
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 07:50 AM
If you can see the CC to the required email, then SNOW is copying the user in the email.
Check with Microsoft team and see if there is some issue to the users email in receiving emails from ServiceNow
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 06:07 AM
try below
email.addAddress('cc', user.email.toString(), user.getDisplayValue());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 07:13 AM
Hi Ajay,
Thank you for the feedback. I have tried the same but I am unable to set the CC in outlook. When I verified email logs, I am able to see the CC to the required email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 07:50 AM
If you can see the CC to the required email, then SNOW is copying the user in the email.
Check with Microsoft team and see if there is some issue to the users email in receiving emails from ServiceNow
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
You just set the type, address you want to send and the address display name. You need to write this in the email scripts.
//email.addAddress(type, address, displayname);
email.addAddress("cc","john.copy@example.com","John Roberts");
in your case as your querying the table and getting values put something like below:
email.addAddress('cc', user.email, user.getDisplayValue());
Mark this answer as correct if this resolves your issue