> For the complete documentation index, see [llms.txt](https://docs.mailofly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailofly.com/product-guides/templates.md).

# Email templates

Templates are reusable messages: a **name**, **subject**, and **body** (rich HTML from the editor). Campaigns reference a template so you do not paste HTML for every send.

## What it is

The editor supports formatting, links, images, and merge-style placeholders (for example contact first name). Templates are versioned in your account until you replace or delete them.

## How it helps

* **Consistency** — one approved layout for onboarding or newsletters.
* **Faster campaigns** — pick a template and a segment instead of rebuilding each send.
* **Personalization** — placeholders pull from contact fields at send time.

## How to use it

Visit [Templates](https://www.mailofly.com/user/templates) to browse cards, search, and open the editor. Set subject and body, then save. Link the template when you create or edit a campaign.

### Subject and “ready”

A template without a subject is treated as a draft in filters; campaigns should use templates that have both subject and body filled in for predictable sends.

## Vs one-off HTML in code

Storing HTML only in your codebase skips the editor, previews, and non-developer edits. Mailofly templates live beside segments and campaigns so marketers can iterate without deploys—while the API still lets you create or update templates programmatically.

## Related

* [Compose](/product-guides/compose.md) — load a template for one-off send
* [Campaigns](/product-guides/campaigns.md) — attaching a template
* [REST API: Templates](/rest-api/templates.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mailofly.com/product-guides/templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
