Feature Requests
Share ideas, discuss and vote on requests from other users in community
 

sendMessage Hooks

Shaun Reitan shared this idea 5 years ago
Completed

I would like to see hooks inside the sendMessage function. I would like to see a pre and post hooks.

The prehook should allow for setting additional template vars and allow a message to not send if the hook returns an abort.

The post hook should pass the id of the message that was stored in the database as well as all the template vars and maybe even a copy of the email's message body, subject recipients, etc.

Best Answer
photo

A new hook point "EmailPreLog" is included in WHMCS 7.0 and provides the ability to intercept and alter the logging.

Comments (3)

photo
1

No.

photo
2

The main reason for this hook is so that i can create a hook that will match and replace passwords in the email log. I'm trying to remove passwords from being stored in the email log in plain text.

photo
1

A new hook point "EmailPreLog" is included in WHMCS 7.0 and provides the ability to intercept and alter the logging.