> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/template-architecture/document-formats/html-email-format.md).

# HTML Email Templates

Use this format when the final output should be an email body.

HTML Email Templates let you merge Salesforce data into subject lines, recipients, and message content.

If you need a generated file instead, start with [PDF Templates](/sdocs/template-architecture/document-formats/pdf-templates.md) or another document format in [Document Formats](/sdocs/template-architecture/document-formats.md).

{% hint style="info" %}
Pick **HTML Email Templates** when the output should be sent as email.

Pick a document format when the output should be downloaded, attached, or stored as a file.
{% endhint %}

### Use this format when

* You want a reusable email body with merge fields.
* You need default subject and recipient values.
* You want users to send generated documents with a predefined email message.

### Keep these limits in mind

* This format builds email content, not document files.
* Email sending behavior depends on your email settings.
* Sender, recipient, and domain rules are controlled outside the body content.

### Start with the guide that fits your task

<table data-card-size="large" data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-card-target data-type="content-ref">Target</th></tr></thead><tbody><tr><td><strong>Email Settings Tab</strong></td><td>Control default subjects, recipients, sender options, and outbound email restrictions.</td><td><a href="/pages/t0B9OwQAsq9pifCtcYh7">/pages/t0B9OwQAsq9pifCtcYh7</a></td></tr><tr><td><strong>Email Settings Quick Reference</strong></td><td>Scan each email setting fast in table format.</td><td><a href="/pages/UsUCKFiVn5S9snEhvfOJ">/pages/UsUCKFiVn5S9snEhvfOJ</a></td></tr><tr><td><strong>Email Delivery and Security</strong></td><td>Set sender behavior, locked fields, and approved recipient domains.</td><td><a href="/pages/Dqn2AXmZcxBNIWuFyGqG">/pages/Dqn2AXmZcxBNIWuFyGqG</a></td></tr><tr><td><strong>How To: Sending Generated Documents via Email</strong></td><td>Use an HTML Email Template when sending documents from the Documents component.</td><td><a href="/pages/MpqjrnQuiUqkizD25hza">/pages/MpqjrnQuiUqkizD25hza</a></td></tr><tr><td><strong>How To: Email Editor In Flow</strong></td><td>Use email templates and prefilled email values in Salesforce Flow.</td><td><a href="/spaces/WKNnJmhJBQwhdk5WBFsi/pages/qXbzsyU8aK2CyCfvT0M6">/spaces/WKNnJmhJBQwhdk5WBFsi/pages/qXbzsyU8aK2CyCfvT0M6</a></td></tr></tbody></table>


---

# 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://help.sdocs.com/sdocs/template-architecture/document-formats/html-email-format.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.
