So that you’re not modifying core code, you can create a local overlay of the SendEmail.pm file and just overlay one sub routine from that file.
If you create the file: /opt/rt5/local/lib/RT/Action/SendEmail_Vendor.pm
You can then add the package RT::Action::SendEmail; and overlay an existing subroutine that gets called like SetRTSpecialHeaders and add your code to include the custom header
You can create separate correspond scrips per Queue that use separate templates for each Queue respectively. Then add your custom header in the templates defining the queue that sent the email.
New line characters are key on templates, add your custom header before the body of the email.
For example i will modify the “Correspondence in HTML” template
The italics parts (lines before the new line charter) are the header part of the email sent.
The normal text is the body of the email.