- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2014 07:42 PM
I am pretty new to ServiceNow so bear with me.
I have an instance running Calgary. What I am trying to do, is to bcc all outbound emails and notifications from our instance to a certain email address, so I am testing it on our DEV instance.
Correct me if I'm wrong, but I have tried adding the below script in the Message Body of one of the email templates.
<mail_script>
email.addAddress("bcc", "address@bcc.com","address to bcc");
</mail_script>
Would that be the correct thing to do? When I run a test though, the email I received in my 'catch-all' email inbox shows only the "To:" recipients, and no CC. The email logs also don't show the CC and BCC emails going out.
This is also the case when I send an email manually through the incident record.
address@bcc.com is already a user in the database.
Have I done the right thing? How do I know if CC and BCC are actually being sent?
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2014 08:09 PM
I'm comparing to the example from the wiki (user does not need to be in the database), and your mail script looks right. For ref...
(Guessing you got the info from there)
There is a Blind Copied field on email log records that is not on the form by default and you will need to add it to the form be able to see any bccs for a message that has gone out. I'd do that as a first port of call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2014 08:09 PM
I'm comparing to the example from the wiki (user does not need to be in the database), and your mail script looks right. For ref...
(Guessing you got the info from there)
There is a Blind Copied field on email log records that is not on the form by default and you will need to add it to the form be able to see any bccs for a message that has gone out. I'd do that as a first port of call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2014 09:36 PM
Thanks Russell. That helped! I can now see that the recipients are appearing in the Blind Copied field. Shall try it out on our PROD instance, hopefully it does send properly.
Do you know if there is a way to set the BCC as a global rule? Instead of having to go through every single template and adding the mailscript?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2017 01:37 PM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Scripting for Email Notifications
Visit http://docs.servicenow.com for the latest product documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2014 07:53 PM
BCC in my PROD instance is now working properly. So the code I original put it did work. Just needed a verification from the logs, of which Russell has helped me out with.
Apparently there is no way to set up a global BCC rule for all outgoing email. Will have to add the mailscript to every notification template.
If anyone knows otherwise, feel free to drop me a line. Thanks!