Remove email address from CC list if detected
Recently one of our tickets was stuck in a comment loop since the customer added a specific email address to the CC list. Does anyone know of a way to set up a rule to:
- find if CC list contains x@y.com
- remove ONLY x@y.com from the CC list
Thanks!
Answers (2)
Top Answer
To prevent loops from happening, you could head over to Service Desk › Configuration › Service Desk Email Preferences.
And add this email to the exclusions list, you can even block every email with the word "AutoReply" in the subject or something like that.
Source: KACE SMA 10.0.290 Admin Guide.
In addition to the method Channeler gave, you can address this with a CTR. Here are some "back of the envelope" queries that should work.
To match tickets with the email address in the CC_LIST:
SELECT ID FROM HD_TICKET WHERE CC_LIST like '%x@y.com%'
To update:
UPDATE HD_TICKET set CC_LIST = replace(CC_LIST, '%x@y.com%', '') where ID = <TICKET_IDS>
Set the rule to run on ticket save.
Note, I didn't test either of these but I'm reasonably confident they will work.