> For the complete documentation index, see [llms.txt](https://docs.meta-inf.hu/email-this-issue/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meta-inf.hu/email-this-issue/email-this-issue-for-jira-server-data-center/documentation/outgoing-emails/email-templates/adding-custom-macro-to-email-templates.md).

# Adding custom macro to email templates

To add custom macro to an email template, do the following:

1\. Go to **Email Templates** under **OUTGOING EMAILS**.

2\. Click the three dots next to the name of the template you want to edit, and choose the **Edit HTML** option.

3\. In the **HTML Body Template** editor under the **Edit Template** panel, you can insert your velocity code at the top of the HTML code between `<!--` and `-->`, then save it.

![](/files/hKXVl6Z67ktss6SxQCBC)

{% hint style="success" %}
**Result**: If the velocity code is correct, you can use the macro in your email template.
{% endhint %}

<br>

<br>

<br>
