yswery Posted April 6, 2019 Share Posted April 6, 2019 Hi people I know there is a hook that ticketopen (https://developers.whmcs.com/hooks-reference/ticket/#ticketopen) but it is only triggered AFTER a new ticket is created Is there way for me to have my own code BEFORE a ticket is created, my objective is to do spam detection on my side (code wise) and if it passes only then have the ticket opened I know i can do the detection and then automatically "close" or "delete" a spammy email but I also really want to NOT send an email out when there is a new spam ticket created Any help would be greatly appreciated 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted April 8, 2019 Share Posted April 8, 2019 The closest hooks might be https://developers.whmcs.com/hooks-reference/everything-else/#preemailsendreducerecipients and https://developers.whmcs.com/hooks-reference/everything-else/#emailpresend but not sure if they fire on ticket sending and if the relid would be the ticket or like a template. My thinking was if it does fire on tickets and the relid is a ticket Id, then you could return the abort response if the ticket is the filtered one. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted April 8, 2019 Share Posted April 8, 2019 (edited) Yeah, EmailPreSend is the way to go. The boring part is that as soon as you detect that the ticket is legit, you'll need to manually send the email you have just aborted with SendEmail API. Edited April 8, 2019 by Kian 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.