- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2016 12:29 PM
Hi All,
Please help I am looking to add a cc box in an email notification but I can't seem to locate how to do this. I see a bunch of things in the community but it appears that it all involves scripting. Is there anyway around this?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2016 06:52 PM
That is definitely doable, too. So, rather than putting in an address and name manually, you can reference a field/variable from the table.
So, you could do something like this to send a CC to the manager of the current assignment group on an incident email:
email.addAddress("cc", current.assignment_group.manager.email, current.assignment_group.manager.name);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2016 11:43 PM
Hi,
I have created the same scenario as you have described with same name also in the below instance
User Name:admin
Password:admin
Please login to the instance and Order a "Acrobat" catalog item which is under Software category.
Then Please check email logs and notification created.
Please compare this with your instance and correct accordingly.
Please mark it as Helpful/Correct according to its impact .
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2020 06:17 AM
Hi
I have almost same scenario:
I have 1 approval reminder email notification (sysapproval_approver) table.
We want to trigger email to "requested_for" in CC.
How can we acheive this.
I have tried to write mail script also but not sure how we can pass address and name in this case. Because notification is on sysapproval_approver table and we want to access requested_for field for RITM.
Kindly help me out.
Many Thanks,
Anupam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 10:28 AM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Scripting for Email Notifications
Visit http://docs.servicenow.com for the latest product documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2024 12:55 AM
Thank you for explaining, i learnt a new thing today. Tested and it works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2017 04:48 PM
I have tried this ten different ways and my CC always shows up undefined. My log statements are showing the user name and email correctly. Any thoughts?
(function runMailScript(current, template, email, email_action, event) {
var pro = current.u_provisioner;
gs.log("Provisioner is " + pro);
var proinfo = new GlideRecord('sys_user');
proinfo.addQuery('sys_id', pro);
proinfo.addQuery("notification", 2);
proinfo.addQuery("email", "!=", "");
proinfo.query();
gs.log("Provisioner email is " + pro.email + " name is " + pro.getDisplayValue());
gs.log("pro name " + current.provisioner.name + " email " + current.provisioner.email);
email.setReplyTo(current.u_provisioner.name+' <'+current.u_provisioner.email+'>');
email.setFrom(current.u_provisioner.name+' <'+current.u_provisioner.email+'>');
email.addAddress("cc", proinfo.getDisplayValue(), proinfo.email);
})(current, template, email, email_action, event);
thank you,
Stacy