Adding gmails to CC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:32 AM
Hi all,
i have a requirement to add email address from two fields in the CC of the notification that will trigger once the status is closed complete.I have tried using Notification script but it is not working kindly help me on this.
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:44 AM
Hi @vivek110 ,
the email script looks good it should work.
can you share the screen shot of the notification?
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:45 AM
Please check Solved: How do I add a cc in an email notification?? Pleas... - ServiceNow Community
Add something like email.addAddress('cc', current.delivery_head_email_id,current.delivery_head_name);
Vinuthna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 04:07 AM
Hi @vivek110 ,
I am assuming both fields are dictionary of the target table and not the catalog variables.
Make sure your email script is getting called from notification, check the syntax, it should be like "${mail_script:incident_closed_cc_list}".
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 04:32 AM
Hi @vivek110 ,
Sample script you can try:
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
email.addAddress("cc","pradeep@gmail.com","Pradeep");
})(current, template, email, email_action, event);
Thanks,
Pradeep
Regards,
Pradeep