Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add "to" recipient in notification via email script. I am able to add "cc" and "bcc" users but not "to" users

Ajay Sharma2
Tera Guru

How to add "to" recipient in notification via email script. I am able to add "cc"  and "bcc" users  but not "to" users

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Ajay,

you cannot set the recipient the same way you set cc and bcc

there are 2 options for recipients based on way you are triggering email notifications

1) if you are triggering email using insert/update then you can include the recipient in who will receive; there you can select the user or group,

2) if you are triggering email using gs.eventQueue('eventName', object, recipient) you can send the list of user sys_ids and email addresses in 3rd parameter

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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