> 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

Use this tutorial when you want one template to generate a document and open with email defaults already in place.

## What it looks like

After setup, one generated quote gives the user all of this:

* 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

This is the right end state for quote, invoice, and renewal templates that users email often.

## When to use email settings

Use email settings when you need predictable email behavior from one template.

**Best for:**

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

Use another feature when the problem is different:

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

## Configure email settings for a quote template

### What you'll configure

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

**Estimated time:** 15 minutes

### Prerequisites

Before starting, make sure you have:

* An existing S-Docs template
* The template's **Related To Type** set to `Opportunity`
* Permission to edit S-Docs 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 %}

### Step 1: Open the template editor

1. Go to **S-Docs Templates** in Salesforce.
2. Open your quote template.
3. Click **Edit Template**.
4. Open **Email Settings**.

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

{% step %}

### Step 2: 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 useful subject already filled in.

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 template body.
{% endhint %}
{% endstep %}

{% step %}

### Step 3: Set the default recipients

This saves users from typing the same email addresses every time.

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, the user can still enter an address manually.
{% endstep %}

{% step %}

### Step 4: Set the sender behavior

Choose whether the email should come from the user 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 each user's signature is added.
{% endstep %}

{% step %}

### Step 5: 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** if users should not edit the email message.
4. Enable **Lock Subject** if the subject must stay fixed.

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

{% step %}

### Step 6: Save and test the email flow

1. Click **Save**.
2. Open a test Opportunity.
3. Generate the document with your 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 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.

## Guardrails and limits

### Merge field rules

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

### 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.

### 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.

### 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, users usually find email issues only 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 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/quick-start/template-building/customize-template-settings-email.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.
