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

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...


Hi Harish,

Your code is not working for me

var answer = [];
answer.push(current.variables.enter_proposer_s_email_address.email);
var ans = current.variables.enter_mail_for_cc.toString();
var ans1 = ans.split(',');
for(var i=0;i<=ans1.length;i++){
var gr = new GlideRecord('sys_user');
gr.addQuery("sys_id",ans1[i]);
gr.addQuery("email", "!=", "");
gr.query();
if(gr.next()){
//gs.addInfoMessage(gr.email);
answer.push(email.addAddress("cc", gr.email));

}
}

anilkumar_tn
Kilo Explorer

Thank you Harish & Ghaing