> 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/quick-start/template-building/customize-template-settings-email.md).

# Customize Template Settings: Email

Configure default email subject, recipients, sender behavior, and sending guardrails for a quote Document Template.

Use this tutorial when you want one Document Template to generate a document with email defaults.

## Reviewing expected results

After setup, one generated quote gives you:

* A prefilled subject, such as `Quote for Renewal - Acme Corporation`
* A default recipient pulled from the related record
* A defined sender option for consistent outbound email
* Optional restrictions that prevent editing or sending to the wrong domain

Use this configuration for quote, invoice, and renewal Document Templates you email often.

## Choosing email settings

Use email settings when you need predictable email behavior from one Document Template.

**Best for:**

* Quote Document Templates with a default subject and recipient
* Invoice Document Templates that should send from one approved address
* Contract Document Templates that need locked email content or domain limits

Use another feature when the problem is different:

* Use [Create Your First Email Template](https://help.sdocs.com/quick-start/template-building/create-your-first-email-template.md).
* Use [Configure Email Sending On Your Record Page](https://help.sdocs.com/quick-start/document-generation/configure-email-sending-on-your-record-page.md).
* Use [Getting Started: Automate Emails](https://help.sdocs.com/quick-start/document-generation/getting-started-automate-emails.md).

## Configure email settings for a quote Document Template

### Configure These Settings

* A default email subject
* Default email recipients
* Sender behavior for outbound email
* Optional sending restrictions

**Estimated time:** 15 minutes

### Meet Prerequisites

Before starting, make sure you have:

* An existing S-Docs Document Template
* The Document Template's **Related To Type** set to `Opportunity`
* Permission to edit S-Docs Document Templates
* At least one Opportunity with an Account and a valid contact email for testing
* Basic familiarity with Merge Field syntax

If you plan to use an org-wide sender address, make sure that address already exists in Salesforce.

{% stepper %}
{% step %}

### Open the Document Template Editor

1. Navigate to **S-Docs Templates**.
2. Open your quote Document Template.
3. Click **Edit Template**.
4. Open **Email Settings**.

You are now in the tab that controls email defaults for this Document Template.
{% endstep %}

{% step %}

### Set the Default Subject

Use a subject pattern that tells the recipient what the email contains.

1. In **Email Subject Settings**, find **Subject**.
2. Enter this value:

{% code title="Email subject" %}

```
Quote for {!Opportunity.Name} - {!Opportunity.Account.Name}
```

{% endcode %}

3. Leave **Lock Subject** unchecked.
4. Leave **Require subject line** unchecked.

The email composer now opens with a prefilled subject.

Example output: `Quote for Renewal - Acme Corporation`

{% hint style="info" %}
Use single-brace Merge Fields like `{!Opportunity.Name}` in settings tabs. Use double-brace Merge Fields like `{{!Opportunity.Name}}` in the Document Template body.
{% endhint %}
{% endstep %}

{% step %}

### Set the Default Recipients

This prevents you from entering the same email addresses repeatedly.

1. Stay in **Email Settings**.
2. In **Email Recipient Settings**, find **To**.
3. Enter this value:

{% code title="To address" %}

```
{!Opportunity.Account.BillingEmail}
```

{% endcode %}

4. Leave **Lock To** unchecked.
5. Leave **CC**, **BCC**, and **Reply To** blank.

The email composer now pulls the main recipient from the related Opportunity account.

If the source field is blank, you can still enter an address manually.
{% endstep %}

{% step %}

### Set the Sender Behavior

Choose whether the email should come from you or from one shared address.

1. In **Email Sender Settings**, find **From**.
2. Select one of these options:
   * **Logged in user** for personal sending
   * Your org-wide email address for shared sending
3. Leave **Restrict to Org-Wide Addresses** unchecked if you want flexibility.
4. Leave **Enable user to choose/select from a picklist** unchecked.
5. Enable **Use Salesforce Email Signature** if your team uses Salesforce signatures.

This defines who the email appears to come from and whether your signature is added.
{% endstep %}

{% step %}

### Add Sending Guardrails

Use these options when you need tighter control over outbound email.

1. Scroll to **Other Email Settings**.
2. In **Email domain restriction**, enter approved domains if needed.

{% code title="Allowed domains" %}

```
yourcompany.com,partnerdomain.com
```

{% endcode %}

3. Enable **Lock Body** to prevent email-message edits.
4. Enable **Lock Subject** if the subject must stay fixed.

These settings help keep email content consistent and reduce sending mistakes.
{% endstep %}

{% step %}

### Save and Test the Email Flow

1. Click **Save**.
2. Open a test Opportunity.
3. Generate the document with your Document Template.
4. From the generated document, click **Email**.
5. Verify these values:
   * **Subject** is prefilled.
   * **To** is prefilled when source data exists.
   * **From** matches your selected sender option.
   * Domain restrictions behave as expected.
6. Send a test email.

You now have a Document Template that opens with consistent email settings.
{% endstep %}
{% endstepper %}

After testing, confirm these results:

* The subject follows your expected pattern.
* The recipient field pulls the expected email address.
* The sender option matches your team's process.
* Locked or restricted fields behave as expected.

## Applying guardrails and limits

### Follow Merge Field Rules

* **Use** single braces in settings tabs.
* If you mix syntax or casing, values can print as raw text or stay blank.

### Configure Sender Behavior

* **Use** an org-wide address only if it is already configured in Salesforce.
* **Expect** sender choices to follow your org's available email address rules.

### Configure Recipient Behavior

* **Check** that the source email field contains real data before testing.
* **Leave** `To` unlocked if users may need to correct or replace recipients.

### Follow Testing Rules

* **Test** with an Opportunity that has real account and email data.
* **Generate** a fresh document after each email settings change.
* **Verify** subject, recipients, sender, and restrictions every time.
* If you skip testing, email issues can surface after live sends.


---

# 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/quick-start/template-building/customize-template-settings-email.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.
