Question about event-generated email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2015 02:14 PM
We would like to pass a recipient's full email address as an event parameter. However when we try this the email associated with the event doesn't get generated even though event is generated.
When we switch the notification to use a User reference field OR pass a user's sys_id as the event parameter, it works fine so I'm thinking SN doesn't like to get email addresses as parameters.
Anyone have any experience with this type of thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2015 02:22 PM
never tried it.. but i suspect if the box is checked it expects the sid for a user so it can go hunt up an email addy....
if you absolutely have to pass in the email address try running a script to add the parm to the cc email address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2015 01:23 AM
Hi Craig,
is the email address associated to a user (as primary email address)?
Looking at this wiki link:
http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification
It states that the two parameters are used to pass quite specific values:
Parm1 | Passes a string value. Notification events pass the Sys ID of the user with the gs.getUserID() method. Other scripts can reference this string value as parm1 using the format ${event.parm1}. |
Parm2 | Passes a string value. Notification events pass the user name with the gs.getUserName() method. Other scripts can reference this string values as parm2 using the format ${event.parm2}. |
That said, it is also possible to use email client scripts to modify the values so you could use the commands mentioned below to send to that particular email address, using the event parameters:
Scripting for Email Notifications - ServiceNow Wiki
Hope this helps.
Alexandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2015 08:04 AM
Hi Craig,
I was having the same issue - the email address was not being stored in the Event Parm 1 or 2. My issue however, was that a user I need to send the email to may not be an actual user in our application since they are external vendors that we aren't creating user accounts for. I basically need to send back an email to the sender (whoever it is). I was able to get the email string in parm1 by using a variable first.