Inbound Action for incoming emails that dont match any of the conditions

sreed
Kilo Explorer

We are having a problem with users emailing the service-now mailbox instead of the Service Desk. We would like to change our inbound email rules so that if no matches are found the last action is to trigger a reply email to the sender indicating that they should be emailing the our service desk rather than the service-now email address. Has anyone done something like this? Im having trouble finding a way to get an inbound email script to create no record but still produce a notification. I assumed I could have it create an event but it just skips the rule entirely if there is no record to create. Anyone have an idea for me?


Thanks!

6 REPLIES 6

sgrison
Tera Guru

Create a new table called 'Non Processed Emails'.   Create a new inbound action on the Non Process Emails table - setup your conditions and put the following in the script to log the details and queue an email notification:



current.u_from = email.from;


current.u_subject = email.subject;


current.u_body = email.body_text;


current.insert();


gs.eventQueue("system_auto_reply", current, email.body_text, email.subject);


*Many thanks for the response, will have a look at configuring when I get 5


min*