# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET 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?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
