How to set CC with email content

Mi4
Tera Expert

Hi,

Is it possible to set sender in CC with email content?

find_real_file.png

I am trying to set notification as a task in a lifecycle event.

Regards,

1 ACCEPTED SOLUTION

Alok Das
Tera Guru

Hi,

You need to create a email script and define the user you want to set as cc in email and then call the email script from the notification.

Steps to create Email Script and how to use:

  1. Navigate to the "Notification email Script" in the "System Notification" in filter navigator.
  2. Set the name of email notification "add_newusers_to_cc".
  3. add below code in the script:
 email.addAddress("cc","email_address_of_the_user","Name_of_ther_user");
//if you want to push the user dynamically then you can use the scripting to validate and push the user.

4. Now navigate to the notification where you want to add cc.

5. add "${mail_script:add_newusers_to_cc}" in "Message HTML" field in "What it will contain" form section of notification.

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Alok

 

 

View solution in original post

19 REPLIES 19

Utpal Dutta1
Mega Guru

Hey MI,

 

You may have to email script to do this.

 

//email.addAddress(type, address, displayname);

 

    email.addAddress("cc", "john.copy@example.com","John Roberts");

 

    email.addAddress("bcc", "john.secret@example.com","John Roberts")

 

 

Refer to these links also: https://community.servicenow.com/community?id=community_question&sys_id=37290fe1db5cdbc01dcaf3231f96...

 

https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/script/server-scripting/concept/...

 

 

If i was able to help you out then please mark my answer Correct and Helpful.

 

 

Thanks and Regards:

Utpal Dutta

Hi,

Sorry for the rudimentary.

Where can I put the text? Does that mean include it in the script?

Regards,

Hey Mi,

 

  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.

 

Don't forget to mark my answer Correct and Helpful.

 

 

Thanks and Regards:

Utpal Dutta

Tanushree Doiph
Mega Guru

Hey,

For that, write an email script and call it in notification,

  script - email.addAddress("cc","mail address","name");

call - ${mail_script:script_name}

Please mark correct and helpful.

 

Thanks

Tanushree

Hi,

Sorry for the rudimentary. Where can I put the text? Does that mean include it in the script?

Regards,