Open an email template (Email this Issue settings / Outgoing emails / Templates / Your template / Edit), and go to the "HTML Template" editor.
Click on the "Open raw HTML editor" and insert your Velocity code at the top of the HTML code between "<!--" and "-->", than Apply and save it.