The CreatorCon Call for Content is officially open! Get started here.

Pass an email address as param

snowtech1
Tera Expert

Hi,

How do we pass an external email address as a parameter in the event

Came across this one for cc and bcc, Scripting for Email Notifications - ServiceNow Wiki.

Want to add the external email address stored in a lookup table, as an actual recipient itself.

ctomasi

abhi_r

Thank in advance.

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

You have method called email.setReplyTo() but that never worked. If you are triggering the notification via event. You can pass it as one of the parameter in gs.eventQueue().


View solution in original post

4 REPLIES 4

Abhinay Erra
Giga Sage

You have method called email.setReplyTo() but that never worked. If you are triggering the notification via event. You can pass it as one of the parameter in gs.eventQueue().


gs.eventQueue('even_name',obj,   abc@xyz.com,abc1@xyz.com   ,'email_text');



checking parm1 as recipient on notification would work?


Yes, a minor tweak, you need to enclose the comma separated email string with quotes like this



gs.eventQueue('even_name',obj, ' abc@xyz.com,abc1@xyz.com'   ,'email_text');


Let me know if your question is answered. If yes please close the thread by marking my response as correct.