Is there a way to filter outbound email being sent?

tsutherland
Kilo Sage

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?

1 ACCEPTED SOLUTION

@tsutherland I just updated my script above realizing I forgot to include the join(",") at the end.  If you are trying my script please be sure to grab the updated version above.

 

Please mark this post or any as helpful or the correct answer if applicable so others viewing may benefit.

View solution in original post

10 REPLIES 10

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Best method would be a before insert business rule on the Email (sys_email) table to prevent it from being inserted so it won't send.

Thank you for that quick response! I created a before insert business rule and filtered "recipients" contains the email address I want to not send to and then selected the action, "abort action". This prevents sending the entire email, which I can live with, but is there a way to not send it ONLY to that address but still send the update to others on the watchlist, etc.?

You could try to update the recipients list in a before business rule and strip out that email address. Is there a specific reason for this requirement? Depending on why you're trying to do this there may be a better way.

We are working with an external service provider to send ticket information to their ticketing system (not ServiceNow) using an email alias and we want to prevent replies to the actual email address because it creates a loop.