The CreatorCon Call for Content is officially open! Get started here.

How to add a group in "CC" in an Email Notification?

anilkumar_tn
Kilo Explorer

Hi All,

I need to map a group under "CC" so that all the group members in that group should be notified about the action on any request.

Please help me to do this.

Thanks in advance,

Anil

1 ACCEPTED SOLUTION

Harish Murikina
Tera Guru

email.addAddress("cc", "group mail id","Jgroup name");


  email.addAddress("bcc", "group mail id","Jgroup name");



Click below link for more info



http://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#Adding_CC_and_BCC_Recip...


View solution in original post

7 REPLIES 7

If it works mark answer correct and close the loop please


Derek10
Tera Expert

Sorry to bring up an old post, was just wondering, how does this work on groups?  What if the  sys user group is just a regular group without a email and just has people in it?

IE add case worker group to mail script
 email.addAddress("cc", "group mail id","Jgroup name");

 

would it be like   email.addAddress("cc", "sys id ?","Jgroup name");

Ram67
Giga Contributor

Hi Derek, 

I had the same query as like you.

I tried this email.addAddress("cc", "sys id ?","Jgroup name"); but in Cc the groupmembers are not getting added instead, the group sys_id got placed in CC. If you have any answer for this, Please give your answer.

Here is the mail script which I used.

var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sys_id);
gr.query();
while(gr.next()) {
var grp = gr.configuration_item.support_group;
var gr_name = grp.name;
email.addAddress("cc", grp, gr_name);
}