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

Expand Hook "EmailPreSend" to allow for custom email headers

Jeff Nolan shared this idea 4 years ago
Under Consideration

Currently, the EmailPreSend hook only allows for additional merge fields for the message body of outbound email messages from the helpdesk. I'd like to see the hook expanded to allow for additional custom email headers, for example "X-Ticket-ID".

The reason is because we have extended WHMCS to the point where it tracks whether ticket replies have been delivered, bounced, opened, etc. This helps our support staff close tickets faster and address communication issues caused by email problems. Plus, we know if our ticket replies are making it to the intended recipients.

Our email service provider sends the email event, timestamp, email address and message headers back to WHMCS via webhook. But does not provide the message body or subject line. This means we can only show email events based on the email address and timestamp. So if we open two tickets for the same customer it is not clear which ticket replies were opened, bounced, etc. i.e. Was it the first ticket we opened for them, or the second?

If we had the capability to add a custom header containing the ticket ID, then we would be able to track events on a per-ticket basis instead of by email address.

Comments (2)


Vote for this!


I would also like to edit the message body in this hook, not just the email headers