The CreatorCon Call for Content is officially open! Get started here.

Outgoing Notification Filters

georgechen
Kilo Guru

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,

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

There is a plugin named Email Filters. You have to activate that first, then follow the instructions you provided.


View solution in original post

6 REPLIES 6

Michael Fry1
Kilo Patron

There is a plugin named Email Filters. You have to activate that first, then follow the instructions you provided.


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!!


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.


Can you define a non-existing user? An active user with invalid email?