- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 02:25 PM
Hi folks,
Anyone has an idea on writing action script to restrict non existing user emails sending out from ServiceNow? I previously raised an article Prevent ServiceNow sends emails to non-existence email users One way is to set up action script (Navigate to System Mailboxes > Administration > Filters) (see a response below)
Use email filters to restrict non existing user emails through writing action script in this
- Navigate to System Mailboxes > Administration > Filters.
- Click New.
- Complete the fields (see the table).
- Right-click in the header bar and select Save from the context menu.
- The Filter Actions related list appears.
- Click New in the related list.
- Select how the system should react when the conditions of this filter evaluate to true.
however in Fuji there seems no such Filters, and I wonder it has changed to somewhere.
Any input would be appreciated.
Regards,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 06:50 PM
There is a plugin named Email Filters. You have to activate that first, then follow the instructions you provided.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 06:50 PM
There is a plugin named Email Filters. You have to activate that first, then follow the instructions you provided.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 07:31 PM
Thanks Michael. This is exactly we are after. I have activated it in our Temp environment, and doing some testings now. Happy to know this beautiful feature!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 10:19 PM
Hi Michael
Just wondering if you could help. Somehow the Email Filter is not function as expected,
Name: (Test) Ignore sending Non-existence user
Short Description: Ignore sending out to non-existence users
Conditions
Recipients contains noaddress
Mailbox is Outbox
Type is send-ready
Action script:
current.error_string = "Email ignored by 'Ignore Non-existence users'";
gs.log('Email ignored by (Test) Ignore sending Non-existence user');
logger.logInfo('Email ignored by (Test) Ignore sending Non-existence user');
Filter Actions
Type Order Active
Makr as Ignored 50 True
The send/receive has not been activated in Email properties as this is an Non-Prod environment.
Any idea would be appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 05:10 AM
Can you define a non-existing user? An active user with invalid email?