How to use email.addAddress in an email template?

Edward Halliday
Mega Guru

Hi All, 

I wrote an mail script that adds an email address as a CC

email.addAddress('cc','example@me.com','Example');

When i use the mail script in Notifcations the CC works fine. 

But when i call the mailscript in an Email Template it does not work (does not add the CC). Why is that? 

Also if there a way to add a CC to a notifcation using a mail script without overidding the Email Template body? 

Thanks for any help

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Edward,

You may find below thread helpful.

mail_script why does it not populate the cc field

 

- Pradeep Sharma

Ankur Bawiskar
Tera Patron
Tera Patron

@Edward Halliday 

there are some limitations around this.

please refer below links for help

doesn't email.addAddress() work for email client templates?

Scripting with Email Client Templates

Email Client & Client Templates

mail_script why does it not populate the cc field

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Edward - Let me know if that answered your question. If so, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@Edward Halliday

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark my response as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader