- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 04:06 PM
I am looking to create an Incidnet for any incoming email that is received in our SN instance that is addressed (either via TO, CC or BCC) to a specific email address (abc@xyz.com). We have about 5 total incoming email mailboxes hooked up to intake emails into SN.
Currently, the conditions on the Incoming Email Action is as such ((email.to.toString().toLowerCase().indexOf("abc@xyz.com") >-1) which matches when the TO or CC fields have the address in it.
What I cannot figure out how to do is to ALSO execute the Inbound Email Action when the BCC has this email address as well.
I tried outputting the Header (email.headers) to the log to see if it contains any trace of the bcc address, but it does not.
Is there anyway to determine the BCC address on a received email like this?
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2016 08:24 AM
Actually, I take it back, I was able to find it by looking in the header info. I used the following:
(email.headers.toString().toLowerCase().indexOf("for <abc@xyz.com>")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 11:32 PM
Have you tried using "email.recipients" variable?
http://wiki.servicenow.com/?title=Inbound_Email_Actions#Accessing_Email_Objects_with_Variables
You can setup your condition, if "email.recipients" contains your desired address, then process your inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2016 07:46 AM
HI Samiul, yes - I also pushed the email.recipients values to the log to check whether or not the BCC address showed up in there, and it does not. I still can't seem to find any practical way to detect the bcc address anywhere in an incoming email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2016 08:24 AM
Actually, I take it back, I was able to find it by looking in the header info. I used the following:
(email.headers.toString().toLowerCase().indexOf("for <abc@xyz.com>")