> 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

Build merged email content in S-Docs when the output should be sent as email, not generated as a file.

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](https://help.sdocs.com/sdocs/template-architecture/document-formats/pdf-templates.md) or another document format in [Document Formats](https://help.sdocs.com/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="https://help.sdocs.com/sdocs/template-architecture/template-settings/email-settings-tab.md">Email Settings Tab</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="https://help.sdocs.com/sdocs/template-architecture/template-settings/email-settings-tab/email-settings-quick-reference-tables.md">Email Settings Quick Reference</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="https://help.sdocs.com/sdocs/template-architecture/template-settings/email-settings-tab/email-delivery-and-security.md">Email Delivery and Security</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="https://help.sdocs.com/sdocs/automation-and-document-lifecycle/workflows/sending-generated-documents-via-email-s-docs-lwc.md">How To: Sending Generated Documents via Email</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="broken://spaces/WKNnJmhJBQwhdk5WBFsi/pages/qXbzsyU8aK2CyCfvT0M6">Broken link</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 by asking a question.

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

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