# How-to add custom macro to email Template?

1\. Open an email template (***Email this Issue settings / Outgoing emails / Templates / Your template / Edit***)

2\. Go to the "***HTML Template***" editor.

![](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Femail-this-issue%2F-Mf8H2Dd9U6eVTBdoMg_%2F-Mf8I46uOYGP0pJzpo7A%2F236552211.png?generation=1626874874641788\&alt=media)

3\. Click on the "***Open raw HTML editor***" and insert your Velocity code at the top of the HTML code between `<!--` and `-->`&#x20;

4\. Ckick **Apply** and **Save**.

![](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Femail-this-issue%2F-Mf8H2Dd9U6eVTBdoMg_%2F-Mf8I46xXRFpOYr1Np2q%2F236748810.png?generation=1626874874667878\&alt=media)

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