> For the complete documentation index, see [llms.txt](https://docs.guestway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guestway.io/guest-experience/branding/how-to-use-a-custom-html-email-template.md).

# How to use a custom HTML email template

This guide shows you how to replace the default Guestway email layout with your own HTML, so that guest emails match your brand.

{% hint style="info" %}
**Before you start**

* You can edit the branding profiles of your organization.
* You have your email layout in HTML.
  {% endhint %}

## Turn on the template

{% stepper %}
{% step %}

### Open the branding profile

Go to **Settings** → **Organization** → **Branding**, and open the branding profile that you want to change.
{% endstep %}

{% step %}

### Choose the emails

Under **Custom email templates**, tick the card of the emails that you want to change:

* **Reservation emails**: emails tied to a reservation.
* **Inquiry emails**: emails without a reservation.

The card now shows **Custom**, and the template starts with `{{messageBody}}`.
{% endstep %}
{% endstepper %}

## Write the template

{% stepper %}
{% step %}

### Open the editor

On the card, click **Edit HTML**.
{% endstep %}

{% step %}

### Add your HTML

Paste or write your HTML in the editor. Put `{{messageBody}}` where the message must go. It must be in the template at least once, otherwise the email would be sent without its message.
{% endstep %}

{% step %}

### Add variables

If you want guest, reservation or property details in the layout, find them with **Search variables...** in the variables panel, and add them to your HTML. Guestway fills them in when it sends the email.
{% endstep %}

{% step %}

### Check the preview

Check the result in **Live preview**. The preview uses sample data.

If you want to see the email in a real email client, click **Open in mail client**. This downloads a file that you can open in Outlook, Apple Mail or another desktop email client.

{% hint style="warning" %}
Emails look different in each email client, for example Outlook and Gmail. Test your email well before you rely on it.
{% endhint %}
{% endstep %}

{% step %}

### Apply the template

Click **Apply**.
{% endstep %}
{% endstepper %}

## Save your changes

{% stepper %}
{% step %}

### Save the branding profile

Click **Save changes**. For a new profile, click **Create branding**. The template is stored only when you save the profile.
{% endstep %}
{% endstepper %}

To go back to the default Guestway layout, untick the card and save the profile. Your custom template is removed.

## Troubleshooting

<details>

<summary>What do I do when the editor says that the template is too large?</summary>

A template can have at most 60,000 characters. Remove parts of the HTML that you do not need, for example large inline styles, and try again.

</details>

<details>

<summary>Why does the preview say "Fix the errors in your custom email template to refresh this preview."?</summary>

Check that the template contains `{{messageBody}}` and that it is not too large. Then the preview refreshes.

</details>

## Related

* [Branding](https://docs.guestway.io/guest-experience/branding.md): all fields of a branding profile, with the limits of the email templates.
* [Domains](https://docs.guestway.io/inbox-and-messaging/domains.md): send your emails from your own domain.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.guestway.io/guest-experience/branding/how-to-use-a-custom-html-email-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
