The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to add CC in Email client template.

keval3
Tera Contributor

Hi All,

I have below requirement 

kindly let me know that how to add 2 cc in email client template 

in CC 1 existing user's email Id is already defined I want to add  1 more over there. please let me know how to add this.

below is OOB script

javascript: (function() {
var myUserObject = gs.getUser();
var mail = myUserObject.getEmail();

//mail = mail + ';'+'GBSCOMEX@upl-ltd.com';
return mail;
}());

 

Thanks & Regards

KP 

9 REPLIES 9

Community Alums
Not applicable

Hello could you share content with us? We do not have access...

Sandeep Rajput
Tera Patron
Tera Patron

Krushna R Birla
Kilo Sage

Hi @keval3 

 

You can create mail script and use it in your message or body. Else it wont be possible as shared in https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0640040

 

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    // Add your code here
    email.addAddress('cc', 'xyz@gmail.com', 'XYZ');
    email.addAddress('cc', 'abc@gmail.com', 'ABC');   //ABC and XYX are user names

})(current, template, email, email_action, event);

 

 

  1. Go to application navigator and search for Email scripts module.
  2. Open it and create a new email script with above code.
  3. Now to call this email script in your notification just call it by this (${mail_script:mail_script_name})  
  4. Use the above calling in Message body.

This will definitely helps you to resolved your issue. Let me know in case you need to understand the flow or you can DM on LinkedIn.

 

If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.

 

Best Regards,
Krushna Birla