BCC on Inbound Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2013 08:15 AM
Hi all,
I was just wondering if anyone has ever set up an inbound email action using the BCC value? If so, what script condition are you using to facilitate this?
I have looked at this and we are receiving emails in to ServiceNow if the address is used as the BCC value however when we use either 'email.to.' or 'email.copied.' we are advised that the action failed due to a condition failure.
Has anyone ever had to do this or is anyone aware if this is possible?
Many thanks,
PW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2013 10:39 PM
Unfortunately, BCCs are usually a pain. You might be able to see a BCc'd address in a Received: header, though. If so, you could possibly parse it out from there. I'm not sure if this is completely sound logic, but perhaps if you can find instancename@service-now.com (or whatever email address you're actually looking for) in the Received headers of an inbound email, and not in email.recipients, then assume it must have been in the BCC.
For instance, here's a realistic example of what the headers might look like in a test message received by an SN instance, where the instance's email address was in the BCC field. If you do a search for the instance's email address (instancename@service-now.com) you'll find only one place (on line #9) where it appears -- in one of the Received headers. But at least it's there. You'll also notice that it's not in the To: or Cc: headers.
Return-Path:<jtester@example.com>
X-Original-To:instancename@pop.iad1.service-now.com
Delivered-To:instancename@pop.iad1.service-now.com
Received:from mx1.iad1.service-now.com (mx1.iad1.service-now.com [10.64.24.27])
by pop.service-now.com (Postfix) with ESMTP id B9D531C09B7
for <instancename@pop.iad1.service-now.com>; Thu, 14 Nov 2013 21:03:19 -0800 (PST)
Received:from mail.example.com (mail.example.com [203.0.113.1])
by mx1.iad1.service-now.com (Postfix) with ESMTPS id 6878F40052
for <instancename@service-now.com>; Thu, 14 Nov 2013 21:03:19 -0800 (PST)
X-IronPort-AV:E=Sophos;i="4.93,704,1378875600";
d="scan'208,217";a="50244173"
Received:from unknown (HELO mailsrv1.example.com) ([203.0.113.3])
by mail.example.com with ESMTP/TLS/AES128-SHA; 14 Nov 2013 23:03:19 -0600
Received:from mailclient.example.com ([203.0.113.5]) by
mailsrv1.example.com ([::1]) with mapi id 14.03.0158.001; Thu, 14 Nov 2013
23:03:18 -0600
From:"Tester, Joe" <jtester@example.com>
To:"John Tester (johnt@example.com)" <johnt@example.com>
CC:"JaneT@example.com" <JaneT@example.com>
Subject:test
Thread-Topic:test
Thread-Index:Ac7hv/yB1RAuV0HnRBSQu7OESiiTwQ==
Date:Fri, 15 Nov 2013 05:03:18 +0000
Message-ID:<FB023A21D246E84CAD43CCCD6E63AAE902F4B262@mailsrv1.example.com>
Accept-Language:en-US
Content-Language:en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip:[203.0.113.5]
Content-Type:multipart/alternative;
boundary="_000_FB023A21D246E84CAD43CCCD6E63AAE902F4B262MAILSRV1Cmailswus_"
MIME-Version:1.0
MultipartContentTypes:text/plain; charset="us-ascii";text/html; charset="us-ascii";
I can't really think of any other ideas off-hand, and I'm not even sure the idea above is reliable enough to trust all the time. 😕 But it might be.
If you do find a solution that works though, I'd love to hear about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2015 08:56 PM
Hi Peter,
As Joe mentioned the BCC email address should be in the header and you might want to add a condition like:
email.headers.toLowerCase().indexOf("add _email_address_here") != -1
Regards.
Gareth