
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 11:17 AM
I want to restrict ServiceNow from sending email to a specific email address or domain. Mail filters seem to only work on inbound email. How would I keep my instance from SENDING email to a specific address?
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 12:31 PM
Please mark this post or any as helpful or the correct answer if applicable so others viewing may benefit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 12:02 PM
Yes in this business rule you can put in script to abort if the only recipient is this specific email address otherwise it can update the recipient list using the replace():
BR Condition - recipients contains BAD-EMAIL-ADDRESS
Script:
//Abort of only recipient is bad email address
if (current.recipients == "BAD-EMAIL-ADDRESS") {
current.setAbortAction(true);
} else {
//Find the bad email address and remove it
var emailRecipients = current.recipients.toString().split(",");
var emailIndex = emailRecipients.indexOf("BAD-EMAIL-ADDRESS");
emailRecipients.splice(emailIndex, 1);
current.recipients = emailRecipients.join(",");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 12:31 PM
Please mark this post or any as helpful or the correct answer if applicable so others viewing may benefit.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 12:43 PM
Thank you Michael! That worked like a charm!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 12:51 PM
Awesome glad this worked for you. Have a great day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2024 11:03 PM
I've tried to use Business Rule in domain-separated environment - does not work =( ...