# Email Templates

> Design emails once in the drag-and-drop editor, personalize them with merge tags, and use them in campaigns and journeys

URL: https://docs.lemuai.com/email/templates

**Note:** **Setup required:** you can design and preview templates right away. Sending them (test sends, campaigns, journeys) needs LemuAI's email service enabled for your account (contact [hello@lemuai.com](mailto:hello@lemuai.com)) and a verified domain in [Email Setup](https://docs.lemuai.com/email/setup).

**Templates** (**Email → Templates** in the sidebar) is where you design emails once, then send them from [campaigns](https://docs.lemuai.com/email/campaigns) and from journey Email steps.

<img src="/images/email-template-editor.png" alt="The email template editor with content blocks on the left, the email preview in the middle and email settings on the right" />

## Create a template

Click **New email template**, give it a name (for example "Cart reminder"), choose a type, and pick what to start from:

| Starter | What you get |
|---|---|
| Blank | An empty email with your brand kit applied |
| Welcome | A greeting for new subscribers |
| Cart reminder | A cart items list and a button back to checkout |
| Newsletter | A header, an intro and two product highlights |
| Order thank-you | A thank-you note for after a purchase |
| Win-back | A note to bring back customers who have gone quiet |

Starters contain placeholder links (`https://`). Replace them before you send; the link check flags them otherwise.

### Marketing or transactional

Every template has a **Type**:

- **Marketing (needs consent, has unsubscribe)**: newsletters, offers, reminders. Only goes to contacts who agreed to email, always shows your postal address and an unsubscribe link, and counts toward frequency caps.
- **Transactional (orders, accounts)**: order confirmations, receipts, account messages. Goes to anyone with an email address who is not suppressed, does not need marketing consent, and does not count toward frequency caps.

Use transactional only for messages the person needs, not for promotions.

## The editor

The editor has three parts: the block list on the left, the email in the middle, and the settings for the selected block on the right.

Across the top you set the **Subject**, the **Preview text** (shown next to the subject in most inboxes) and the **Sender** (defaults to your **Default sender**).

### Blocks

| Block | Use it for |
|---|---|
| Heading | Titles |
| Text | Paragraphs, with bold, italic and links |
| Button | A call to action, with its label, link, colors and shape |
| Image | Upload an image or paste a URL. Add alt text and an optional link |
| Divider | A line between sections |
| Spacer | Empty space |
| Columns | Two or three columns side by side |
| Container | A box that holds other blocks, with its own background, border and padding |
| HTML | Your own HTML, for anything the other blocks can't do. Only admins can add or edit it |

Under **Commerce** there are three ready-made blocks:

- **Product**: a product card with image, name, price and a button. Fill in the product name, price, image and product link.
- **Cart items**: a loop over the items in the event that started the email, for cart and order emails sent from a journey.
- **Footer**: your postal address and unsubscribe link.

Each block can be moved up or down, duplicated or deleted. Select a block to change its text, colors, font size, alignment, padding and so on.

### Saved blocks

Built a header or footer you want to reuse? Select it and click **Save as a reusable block**, then name it. It appears under **Saved blocks** in every template. Changing a saved block later does not change emails that already use it.

## Personalize with merge tags

Merge tags fill in details for each person when the email is sent. Write them anywhere in text, links or subjects:
```text
Hi {{ contact.first_name | default("there") }},
Your {{ event.product_name }} is waiting in your cart.
```

| Tag | What it holds |
|---|---|
| `contact.first_name`, `contact.last_name`, `contact.full_name` | The person's name |
| `contact.email`, `contact.company`, `contact.title`, `contact.tags` | Other contact fields |
| `contact.custom.<field>` | A custom field on the contact, for example `contact.custom.city` |
| `event.<field>` | Data from the event that started the journey, for example `event.order_id` |
| `objects.<type>` | The person's custom records of that type: `count`, `latest` and `items` |
| `organization.name`, `organization.address` | Your business details |
| `unsubscribe_url`, `preferences_url` | Links to unsubscribe or manage email preferences |

Useful extras:

- `| default("there")` shows a fallback when the value is empty. Empty values otherwise show nothing.
- `| money("INR")` formats a number as a price, for example `{{ event.total | money("INR") }}`.
- Loops work too: `{% for item in event.items %}{{ item.title }}{% endfor %}`. The Cart items block writes this for you.

**Info:** Phone numbers are never available in email templates. Values are made safe automatically, so a name with special characters can't break your layout.

## Preview

Click **Preview** to see the email as a sample person or as one of your contacts (enter a contact id to fill merge tags with their details). Switch between **Desktop**, **Mobile** and **Dark mode**. Unsaved changes are included in the preview.

## Checks

Click **Checks** to review the email before sending. Errors stop a campaign from sending; warnings are worth a look.

| Check | Level | What it means |
|---|---|---|
| Add a subject line | Error | The subject is empty |
| A merge tag doesn't work | Error | A merge tag has a typo or can't be filled in |
| Add your postal address | Error | Marketing email needs your postal address in [Email Setup](https://docs.lemuai.com/email/setup#compliance) |
| Domain isn't verified yet | Error | The sender's domain is not verified |
| Links or images don't load | Error | A link or image returns an error (placeholder links included) |
| No DMARC record | Warning | Gmail and Yahoo may junk bulk mail without one |
| The email is too large | Warning | Gmail clips messages over 102 KB |
| Images have no alt text | Warning | Add alt text for screen readers and blocked images |
| Mostly images and little text | Warning | Spam filters and screen readers prefer more text |
| Phrases spam filters dislike | Warning | Words that often trigger spam filters |
| Link shorteners | Warning | Use full links; shorteners hurt deliverability |
| Subject over 80 characters, or all caps | Warning | Long subjects get cut off; all caps looks like spam |
| Add preview text | Warning | Inboxes show it next to the subject |

## Send a test

Click **Send test**, enter up to 10 addresses (comma separated), and optionally a contact id to fill merge tags with that contact's details. Test emails:

- Have **[TEST]** at the start of the subject
- Skip consent and frequency caps
- Don't count in reports
- Are limited to 100 a day per account

## Save and versions

Click **Save** to save a new version (the header shows **Saved v3**, for example, or **Unsaved changes**). Open **Versions** to see every saved version and **Restore** an older one.

Campaigns and journey steps use a specific version of a template, so a campaign that is already scheduled or sending is never changed by edits you make later.

## Manage templates

From the template list you can open, **Duplicate** or archive a template. Archived templates are hidden; tick **Show archived** to see them and restore one.

## Use a template

- In a [campaign](https://docs.lemuai.com/email/campaigns): choose it under **Message**.
- In a journey: add an **Email** step and choose the template, the sender and, optionally, a different subject. The step sends to the contact the journey is running for and reports whether the email was sent, skipped (for example because the person unsubscribed) or failed.
