Add custom macro to email Template

Open an email template (Email this Issue settings / Outgoing emails / Email Templates / Your template / Edit HTML), and on the page go to the "HTML Template" editor.

You can insert your Velocity code at the top of the HTML code between "<!--" and "-->", than save it.

If the velocity code is ok, you can use the macro in your email template.