Parsing Email Headers Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2018 08:27 AM
Hi SNOW Gurus!
got a question here. How do i parse the email headers to create an inbound reply action? I need to create an inbound reply action that is forwarded from a mailbox. But for some reason its not getting the original email sender.
what happen is when John Smith emails FWDemail@servicenow.com and it hits the x@service-now.com the userID of the email is FWDemail@servicenow.com and hence the reply email does not get sent.
I look at the email headers and i can see the original email where it came from as
X-Original-From:John Smith <jsmith@x.com>
Reply-To: John Smith<jsmit@x.com>
how can i parse this and set it as the user id? i tried the field values in the servicenow docs and i still cant get the user id. any help will be appreciated.
if(email.header.Reply-To!=undefined){
current.user_id=email.header.reply-to;}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2018 08:39 AM
Hi Reich,
Check out
email.origemail
I think this is what you are looking for the original email sender.
https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/notification/reference/r_InboundEmailActionExamples.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2018 08:46 AM
Hi
thanks for the reply so should i put in the reply inbound action script as
email.origemail = user_id?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2018 09:09 AM
it's not the ID it's going to be the email address from the original sender.