# Email Notifications

<p class="doc-lead">Send professional emails from Freespace ERP using your company SMTP server — manually from sale documents or (when configured) automatically on document events. Includes rich message body, CC/BCC, document download links, and a company email signature.</p>

<div class="doc-toc">
<p class="doc-toc-title">On this page</p>
<div class="doc-toc-section">
<span class="doc-toc-group-title">Getting started</span>
<div class="doc-toc-links">
<a href="#/features/email-notifications?id=overview">Overview</a>
<a href="#/features/email-notifications?id=prerequisites">Prerequisites</a>
<a href="#/features/email-notifications?id=quick-start">Quick Start — Full Setup</a>
<a href="#/features/email-notifications?id=manual-send">Manual Send from Documents</a>
<a href="#/features/email-notifications?id=automatic-send">Automatic Send on Status Change</a>
</div>
</div>
<div class="doc-toc-section">
<span class="doc-toc-group-title">Configuration</span>
<div class="doc-toc-links">
<a href="#/features/email-notifications?id=provider-setup">1. Email Provider (SMTP)</a>
<a href="#/features/email-notifications?id=template-setup">2. Email Template</a>
<a href="#/features/email-notifications?id=template-parameters">Template parameters</a>
<a href="#/features/email-notifications?id=config-setup">3. Transaction Configs</a>
<a href="#/features/email-notifications?id=recipient-rules">4. Recipient Rules</a>
</div>
</div>
<div class="doc-toc-section">
<span class="doc-toc-group-title">Reference</span>
<div class="doc-toc-links">
<a href="#/features/email-notifications?id=compose-screen">Compose Screen Fields</a>
<a href="#/features/email-notifications?id=examples">Worked Examples</a>
<a href="#/features/email-notifications?id=history">Transaction History</a>
<a href="#/features/email-notifications?id=faq">FAQ</a>
</div>
</div>
</div>

<hr class="doc-section-divider">

<h2 id="overview">Overview</h2>

Email notifications in Freespace ERP use the **Notification System** under **Settings**. Unlike the in-app **Notifications** inbox (bell icon), this sends real emails through your company's SMTP server.

**Two ways to send email**

| Mode | How it works | Best for |
|------|--------------|----------|
| **Manual Send** | User clicks **Send Email** on an approved sale document, reviews the compose screen, then sends. | One-off emails, custom To/CC/subject/body per send. |
| **Automatic Send** | Email is queued when a document reaches a configured status (e.g. Approved) — no user action needed. | Routine notifications on approve, cancel, or secondary status change. |

Both modes use the same SMTP provider, email templates, and delivery pipeline. You can use one or both — they require **separate Transaction Configs** (see below).

**What you can do**

| Capability | Description |
|------------|-------------|
| **Manual Send Email** | Send from **Sale Invoice**, **Sale Order**, **Sale Quotation**, and **Pro Forma Invoice** when status is **Approved**. |
| **Automatic Send Email** | Send on status change (Approved, Cancelled, etc.) for any transaction type supported by Transaction Configs. |
| **Compose before send** | Manual mode only — edit To, CC, BCC, Reply-To, subject, and body before sending. |
| **Document links** | Include secure PDF download links in the email (not file attachments). |
| **Email signature** | HTML signature from the email provider is appended automatically. |
| **Per-company SMTP** | Each company configures its own mail server and sender details. |
| **Test email** | Verify SMTP from the provider edit screen before go-live. |
| **Delivery log** | Track sent, queued, and failed emails in **Transaction History**. |

**What is not included yet**

- PDF files attached directly to the email (links to download PDFs are supported instead).
- Manual **Send Email** button from Purchase Order, Pay Run, and other document types (automatic email configs can still target those transaction types).

<hr class="doc-section-divider">

<h2 id="prerequisites">Prerequisites</h2>

<ul>
<li><b>Email enabled on company plan</b> — your Freespace subscription must include the Email feature. Contact support if <b>Send Email</b> does not appear.</li>
<li><b>SMTP credentials</b> — host, port, username, and password from your mail provider (Gmail app password, Microsoft 365, company mail server, etc.).</li>
<li><b>User access</b> — role must allow Notification System setup and <b>Send Email</b> on sale documents.</li>
<li><b>Customer email</b> — customer master should have a valid email for pre-filled <b>To</b> address (you can change it on the compose screen).</li>
</ul>

<hr class="doc-section-divider">

<h2 id="quick-start">Quick Start — Full Setup</h2>

Follow these steps once per company. Approximate time: 15–20 minutes.

<h3>Step 1 — Create Email Provider</h3>

Go to <b>Settings → Notification System → Providers → New</b>.

| Field | Example value |
|-------|---------------|
| Name | Company Sales Mail |
| Provider Type | Email |
| SMTP Host | smtp.gmail.com |
| SMTP Port | 587 |
| Username | sales@yourcompany.com |
| Password | *(app password or SMTP password)* |
| Encryption | TLS |
| From Email | sales@yourcompany.com |
| From Name | Your Company Pvt Ltd |
| Reply-To | sales@yourcompany.com |
| Email Signature | *(optional HTML — see provider setup below)* |
| Test Email To | your.name@yourcompany.com |

Click <b>Send Test</b> on the <b>Test Email To</b> field to verify SMTP. Save the provider.

<h3>Step 2 — Create Email Template</h3>

Go to <b>Settings → Notification System → Templates → New</b>.

| Field | Example value |
|-------|---------------|
| Provider Type | Email |
| Name | Sale Invoice Email |
| Channel | Email |
| Email Subject | Invoice {{billNumber}} from Our Company |
| Email Body | Dear {{customerName}},&lt;br&gt;&lt;br&gt;Please find your invoice {{billNumber}} dated {{billDate}} for {{total}}.&lt;br&gt;&lt;br&gt;Thank you. |
| Include Document Links | ✓ (checked) |

<b>Template Parameters</b> (add one row per placeholder used in subject/body):

| Parameter Name | Field Path | Data Type | Order |
|----------------|------------|-----------|-------|
| billNumber | billNumber | String | 1 |
| customerName | customer.name | String | 2 |
| billDate | date | Date | 3 |
| total | total | Currency | 4 |

<p><b>Parameter Name</b> is what you type in <code>{{braces}}</code> in the subject and body. <b>Field Path</b> is where the API reads the value from the document — see <a href="#/features/email-notifications?id=template-parameters">Template parameters</a>.</p>

<p>Save the template.</p>

<h3>Step 3 — Create Transaction Config</h3>

Go to <b>Settings → Notification System → Transaction Configs → New</b>.

Choose **manual** or **automatic** setup (or create both as separate configs):

<p><b>Option A — Manual Send</b> (for the <b>Send Email</b> button)</p>

| Field | Example value |
|-------|---------------|
| Use for Manual Send | ✓ (checked) |
| Transaction Type | Sale Invoice |
| Channel | Email |
| Default Provider | Company Sales Mail |
| Notification Template | Sale Invoice Email |

When <b>Use for Manual Send</b> is checked, status, delay, conditions, and fallback fields are hidden.

<p><b>Option B — Automatic Send</b> (on approve, no user action)</p>

| Field | Example value |
|-------|---------------|
| Use for Manual Send | *(unchecked)* |
| Transaction Type | Sale Invoice |
| Transaction Status | Approved |
| Channel | Email |
| Default Provider | Company Sales Mail |
| Notification Template | Sale Invoice Email |
| Default Recipient Rule | Customer Email *(see Step 4)* |
| Delay (minutes) | 5 *(optional — wait before sending)* |

Save the config. For manual send, repeat for **Sale Order**, **Sale Quotation**, and **Pro Forma Invoice** if needed (one manual config per transaction type + email channel).

<h3>Step 4 — Recipient Rule (automatic send only)</h3>

If you chose automatic send, create a recipient rule so the system knows who to email:

Go to <b>Settings → Notification System → Recipient Rules → New</b>.

| Step | Step Type | Recipient Type | Recipient ID Field Path |
|------|-----------|----------------|-------------------------|
| 1 | resolve | Customer | customerId |

Link this rule as <b>Default Recipient Rule</b> on the automatic Transaction Config. Skip this step for manual send — the user sets <b>To</b> on the compose screen.

<h3>Step 5 — Send or trigger</h3>

<ol>
<li>Open an <b>Approved</b> Sale Invoice.</li>
<li>Click <b>Send Email</b> on the toolbar.</li>
<li>Review pre-filled To, subject, body, and document links.</li>
<li>Click <b>Send Email</b> on the compose screen.</li>
<li>Confirm success message and check <b>Transaction History</b> if needed.</li>
</ol>

<p>For <b>automatic</b> setup: approve a sale invoice — the email is queued after the configured delay and appears in <b>Transaction History</b>.</p>

<hr class="doc-section-divider">

<h2 id="manual-send">Manual Send from Documents</h2>

<b>Send Email</b> appears on the view toolbar when the document is <b>Approved</b> and your role has access.

| Document | ERP path |
|----------|----------|
| Sale Invoice | Sales → Sale Invoice → open approved invoice |
| Sale Order | Sales → Sale Order → open approved order |
| Sale Quotation | Sales → Sale Quotation → open approved quotation |
| Pro Forma Invoice | Sales → Pro Forma Invoice → open approved pro forma |

The compose screen opens with:

- <b>To</b> pre-filled from customer email (editable)
- <b>Subject</b> and <b>Body</b> from your email template placeholders
- <b>Documents</b> section with download links for the current document (and optionally related documents you add)
- Company <b>email signature</b> appended when the email is sent

<hr class="doc-section-divider">

<h2 id="automatic-send">Automatic Send on Status Change</h2>

When a Transaction Config has <b>Use for Manual Send</b> unchecked and a <b>Transaction Status</b> (or Secondary Status) set, the system queues an email automatically when a matching document reaches that status.

<b>When it fires</b>

| Trigger | Example |
|---------|---------|
| Document approved | Sale Invoice status changes to <b>Approved</b> |
| Document cancelled | Sale Order status changes to <b>Cancelled</b> |
| Secondary status set | Custom workflow status applied to a document |

<b>What happens</b>

<ol>
<li>Document status changes (e.g. user clicks <b>Approve</b>).</li>
<li>System finds an active Transaction Config matching transaction type, status, and channel <b>Email</b>.</li>
<li>Recipient is resolved from the linked <b>Recipient Rule</b> (typically customer email).</li>
<li>Subject and body are built from the linked email template — no compose screen.</li>
<li>Email is queued (after optional delay) and sent by the background worker.</li>
<li>Result appears in <b>Transaction History</b>.</li>
</ol>

<b>Automatic vs manual — key differences</b>

| | Manual Send | Automatic Send |
|---|-------------|----------------|
| Config flag | <b>Use for Manual Send</b> checked | <b>Use for Manual Send</b> unchecked |
| Trigger | User clicks <b>Send Email</b> | Document status change |
| Recipient | User edits <b>To</b> on compose screen | Resolved from <b>Recipient Rule</b> |
| Subject / body | Pre-filled, user can edit | From template only — no compose screen |
| CC / BCC | User enters on compose | <b>Default CC</b> / <b>Default BCC</b> on config |
| Delay | Sent immediately | Configurable <b>Delay (minutes)</b> |
| Document types (manual button) | Sale Invoice, Sale Order, Sale Quotation, Pro Forma Invoice | Any type supported in Transaction Configs |

<p>You can have <b>both</b> a manual config and an automatic config for the same transaction type — they are separate records and do not conflict.</p>

<hr class="doc-section-divider">

<h2 id="provider-setup">1. Email Provider (SMTP)</h2>

<p><b>ERP path:</b> Settings → Notification System → Providers</p>

See also: <a href="#/settings/notification-providers">Notification Providers</a> settings page.

<h3>General</h3>

| Field | Description |
|-------|-------------|
| Name * | Friendly name shown when selecting a provider on configs. |
| Provider Type * | Select <b>Email</b> for SMTP setup. |

<h3>Email Configuration</h3>

Shown only when Provider Type is <b>Email</b>.

| Field | Description |
|-------|-------------|
| SMTP Host * | Mail server hostname (e.g. smtp.gmail.com, smtp.office365.com). |
| SMTP Port * | Usually 587 (TLS) or 465 (SSL). |
| Username * | SMTP login — often the full email address. |
| Password | SMTP password. On edit, leave blank to keep the existing saved password. |
| Encryption | TLS, SSL, or None — match your mail provider requirements. |
| From Email * | Address shown in the <b>From</b> field of outgoing emails. |
| From Name | Display name shown with From Email (e.g. Your Company). |
| Reply-To | Optional address for customer replies. |
| Test Email To | Recipient for <b>Send Test</b> — uses current form values without saving first. |
| Email Signature | HTML signature appended to every email (manual and automatic). |

<h3>Test email</h3>

On the provider <b>Edit</b> screen, enter an address in <b>Test Email To</b> and click <b>Send Test</b> on that field. The test uses your current form values (host, port, signature, etc.) so you can verify changes before clicking <b>Update</b>.

<hr class="doc-section-divider">

<h2 id="template-setup">2. Email Template</h2>

<p><b>ERP path:</b> Settings → Notification System → Templates</p>

See also: <a href="#/settings/notification-templates">Notification Templates</a> settings page.

<h3>General</h3>

| Field | Description |
|-------|-------------|
| Provider Type * | Email |
| Name * | Template name for your reference. |
| Channel * | Email (set automatically when Provider Type is Email). |
| Priority | Lower number = higher priority when multiple templates match. |

<p>When Provider Type is <b>Email</b>, only <b>General</b>, <b>Template Parameters</b>, and <b>Email Content</b> are shown on the form.</p>

<h3>Email Content</h3>

| Field | Description |
|-------|-------------|
| Email Subject | Subject line. Use <code>{{parameterName}}</code> tokens defined in Template Parameters below. |
| Email Body | Rich HTML body. Use the same <code>{{parameterName}}</code> tokens. |
| Include Document Links | When checked, secure PDF download links for linked documents are appended when the email is sent. |

<h3 id="template-parameters">Template parameters</h3>

<p>Each row under <b>Template Parameters</b> maps a placeholder name to a field on the transaction record. When you click <b>Send Email</b>, the API loads the document, resolves each field path, and substitutes values into the subject and body.</p>

<p><b>How it works</b></p>

<ol>
<li>Add a parameter row with <b>Component Type = Body</b>.</li>
<li><b>Parameter Name</b> — the token you use in Email Subject and Email Body, e.g. <code>{{billNumber}}</code>.</li>
<li><b>Field Path</b> — dot-notation path on the loaded document JSON (see tables below). The API uses <code>_.get(transactionData, fieldPath)</code> — do <b>not</b> prefix with the transaction type (<code>customer.name</code>, not <code>saleInvoice.customer.name</code>).</li>
<li><b>Data Type</b> — controls formatting: <b>Date</b> → <code>DD MMM YYYY</code>; <b>Currency</b> → two decimal places; <b>String</b> → plain text.</li>
<li><b>Default Value</b> — optional static fallback when the field path is empty or missing (useful for a fixed company name in the subject).</li>
</ol>

<p><b>Loaded associations</b> — the API automatically includes these nested objects when sending from sale documents:</p>

| Association | Fields available on the path |
|-------------|------------------------------|
| customer | customer.name, customer.email, customer.phone, customer.secondaryPhone |
| employee | employee.firstName, employee.lastName, employee.primaryEmail, employee.secondaryEmail |
| supplier | supplier.name, supplier.email, supplier.phone *(purchase documents)* |

<h3>Example — Sale Invoice template</h3>

<p>Email Subject: <code>Invoice {{billNumber}} from Acme Trading</code></p>
<p>Email Body: <code>Dear {{customerName}},&lt;br&gt;&lt;br&gt;Your invoice {{billNumber}} dated {{billDate}} for {{total}} is ready.&lt;br&gt;&lt;br&gt;Thank you.</code></p>

| Parameter Name | Field Path | Data Type | Order | Resolves to (example) |
|----------------|------------|-----------|-------|------------------------|
| billNumber | billNumber | String | 1 | SI-1042 |
| customerName | customer.name | String | 2 | Gulf Retail LLC |
| billDate | date | Date | 3 | 15 Jun 2026 |
| total | netTotal | Currency | 4 | 12500.00 |

<p>The same field paths work for <b>Sale Order</b>, <b>Sale Quotation</b>, and <b>Pro Forma Invoice</b> — all share the standard bill fields below.</p>

<h3>Common field paths (sale documents)</h3>

| Field Path | Description |
|------------|-------------|
| billNumber | Document number |
| date | Document date |
| dueDate | Payment due date |
| total | Grand total |
| netTotal | Net total (after round-off) — typical choice for invoice amount in emails |
| subTotal | Subtotal before bill-level discount |
| balance | Outstanding balance |
| notes | Notes printed on the document |
| customerPurchaseOrderId | Customer PO / LPO reference |
| vehicleNo | Vehicle number (when used) |
| customer.name | Customer name |
| customer.email | Customer email |
| customer.phone | Customer phone |
| employee.firstName | Sales employee first name |
| employee.lastName | Sales employee last name |

<p>Test your template by opening an <b>Approved</b> document and clicking <b>Send Email</b> — the compose screen shows the resolved subject and body before you send.</p>

<hr class="doc-section-divider">

<h2 id="config-setup">3. Transaction Configs</h2>

<p><b>ERP path:</b> Settings → Notification System → Transaction Configs</p>

See also: <a href="#/settings/notification-transaction-configs">Transaction Configs</a> settings page.

<p>Email requires at least one Transaction Config. Use <b>two separate configs</b> if you want both manual and automatic sending for the same document type.</p>

<h3>Manual send config</h3>

| Field | Description |
|-------|-------------|
| Use for Manual Send * | Check this for configs used by the <b>Send Email</b> button. Hides status, delay, conditions, and fallback fields. |
| Transaction Type * | Sale Invoice, Sale Order, Sale Quotation, or Pro Forma Invoice. |
| Channel * | Email |
| Default Provider * | Your email SMTP provider. |
| Notification Template * | Email template for subject/body pre-fill. |
| Default Recipient Rule | Optional — <b>To</b> is usually edited on the compose screen. |

Only **one active manual config** is allowed per transaction type and channel combination.

<h3>Automatic send config</h3>

Leave <b>Use for Manual Send</b> unchecked and set a trigger status:

| Field | Description |
|-------|-------------|
| Transaction Type * | Any supported document type (e.g. Sale Invoice, Credit Note, Pay Run). |
| Transaction Status * | Draft, Approved, or Cancelled — fires when document reaches this status. |
| Secondary Status | Optional — fires when a custom secondary status is applied instead of Transaction Status. |
| Channel * | Email |
| Default Provider * | Your email SMTP provider. |
| Notification Template * | Email template for subject and body. |
| Default Recipient Rule * | Required — resolves who receives the email (e.g. customer email). |
| Default CC / Default BCC | Optional comma-separated addresses added to every automatic send. |
| Delay (minutes) | Wait after trigger before sending (default 5). Set to 0 for immediate send. |
| Condition JSON | Optional filter — e.g. only send when total exceeds a minimum. |
| Fallback Provider / Fallback Channel | Optional backup if primary send fails. |

<p>Automatic email uses the same SMTP provider, templates, signature, and document links as manual send. There is no compose screen — content comes entirely from the template.</p>

<hr class="doc-section-divider">

<h2 id="recipient-rules">4. Recipient Rules</h2>

<p><b>ERP path:</b> Settings → Notification System → Recipient Rules</p>

| Mode | Recipient rule required? |
|------|--------------------------|
| Manual Send Email | No — user sets <b>To</b> on the compose screen. Rule is optional for default pre-fill. |
| Automatic Send Email | Yes — system must resolve the recipient when the status trigger fires. |

Example rule — customer email from invoice:

| Step | Step Type | Recipient Type | Recipient ID Field Path |
|------|-----------|----------------|-------------------------|
| 1 | resolve | Customer | customerId |

See <a href="#/settings/notification-recipient-rules">Recipient Rules</a> for full field reference.

<hr class="doc-section-divider">

<h2 id="compose-screen">Compose Screen Fields</h2>

Opened from <b>Send Email</b> on an approved sale document.

<h3>Recipients</h3>

| Field | Description |
|-------|-------------|
| To * | Primary recipient — pre-filled from customer email. |
| CC | Comma-separated copy addresses. |
| BCC | Comma-separated blind copy addresses. |
| Reply-To | Optional reply address (overrides provider default if set). |

<h3>Message</h3>

| Field | Description |
|-------|-------------|
| Subject * | Email subject — pre-filled from template. |
| Body * | Rich HTML body — pre-filled from template. Signature is appended automatically on send (not shown in the editor). |

<h3>Documents</h3>

Add rows to include PDF download links in the email. Each row has document type and document reference. The current document is typically pre-added.

<hr class="doc-section-divider">

<h2 id="examples">Worked Examples</h2>

<h3>Example A — Gmail SMTP for a trading company</h3>

<p><b>Goal:</b> Send approved sale invoices to customers from sales@tradingco.com.</p>

<ol>
<li>Create provider: Host <b>smtp.gmail.com</b>, Port <b>587</b>, Encryption <b>TLS</b>, Username <b>sales@tradingco.com</b>, Password = Gmail <b>App Password</b> (not login password).</li>
<li>Template subject: <b>Invoice {{billNumber}} — Trading Co</b></li>
<li>Template body: greeting, bill number, total, thank-you line.</li>
<li>Manual config: Transaction Type <b>Sale Invoice</b>, Channel <b>Email</b>, link provider + template.</li>
<li>Approve invoice SI-1042 → <b>Send Email</b> → confirm To = customer email → Send.</li>
</ol>

<h3>Example B — Internal copy on every manual send</h3>

<p><b>Goal:</b> Always CC the sales manager when sending quotations.</p>

<ol>
<li>Open approved Sale Quotation → <b>Send Email</b>.</li>
<li>In <b>CC</b>, enter <b>manager@yourcompany.com</b> (or save as habit each time).</li>
<li>For automatic emails, set <b>Default CC</b> on the Transaction Config (when not using Manual Send only).</li>
</ol>

<h3>Example C — Signature with logo and contact</h3>

<p><b>Goal:</b> Professional footer on all outgoing mail.</p>

<p>On the email provider <b>Email Signature</b> field, enter HTML such as:</p>

<pre><code>Regards,&lt;br&gt;
&lt;strong&gt;Sales Team&lt;/strong&gt;&lt;br&gt;
Your Company Pvt Ltd&lt;br&gt;
Phone: +91 98765 43210&lt;br&gt;
www.yourcompany.com
</code></pre>

<p>Click <b>Send Test</b> on <b>Test Email To</b> to preview signature rendering.</p>

<h3>Example D — Quotation with document link only</h3>

<p><b>Goal:</b> Short email with PDF link, minimal body text.</p>

<ul>
<li>Template body: <b>Please download your quotation using the link below.</b></li>
<li><b>Include Document Links</b>: checked.</li>
<li>On compose, verify the Documents section lists the quotation — send.</li>
</ul>

<h3>Example E — Automatic email when invoice is approved</h3>

<p><b>Goal:</b> Customer receives an invoice email automatically on approve — no manual Send Email click.</p>

<ol>
<li>Create provider and template (Steps 1–2 in Quick Start).</li>
<li>Create Recipient Rule: Step Type <b>resolve</b>, Recipient Type <b>Customer</b>, Field Path <b>customerId</b>.</li>
<li>Create Transaction Config: <b>Use for Manual Send</b> unchecked, Transaction Type <b>Sale Invoice</b>, Transaction Status <b>Approved</b>, Channel <b>Email</b>, link provider, template, and recipient rule.</li>
<li>Set <b>Delay (minutes)</b> to <b>5</b> if you want a short window to cancel before the email goes out.</li>
<li>Approve invoice SI-1042 → after delay, check <b>Transaction History</b> for a queued/sent row.</li>
</ol>

<p>To also allow staff to send customised emails on demand, add a <b>separate</b> manual config (Use for Manual Send checked) for the same transaction type.</p>

<hr class="doc-section-divider">

<h2 id="history">Transaction History</h2>

<p><b>ERP path:</b> Settings → Notification System → Transaction History</p>

Every manual and automatic email creates a history row. Use filters:

| Tab / filter | Use when |
|--------------|----------|
| Sent | Email accepted by SMTP server |
| Queued | Waiting to be processed |
| Failed | SMTP or validation error — open row for error message |
| Channel = Email | Show only emails |

See <a href="#/settings/notification-transaction-history">Transaction History</a> for details.

<hr class="doc-section-divider">

<h2 id="faq">FAQ</h2>

<p><b>Send Email button is missing on my invoice. Why?</b></p>
<ul>
<li>Document must be <b>Approved</b> (not Draft or Pre Approved).</li>
<li>Your company plan must include Email.</li>
<li>Your user role needs Send Email permission on sale invoices.</li>
<li>A Transaction Config with <b>Use for Manual Send</b> must exist for Sale Invoice + Email channel.</li>
</ul>

<p><b>I see "Email not supported for this transaction type".</b></p>
<p>Create a Transaction Config with <b>Use for Manual Send</b> checked for that document type and Channel <b>Email</b>, with active provider and template linked.</p>

<p><b>Test email works but Send Email from invoice fails.</b></p>
<p>Confirm the manual Transaction Config exists and is active. Check Transaction History for the failed row and error text. Ensure customer has a valid email or enter To manually on compose.</p>

<p><b>Authentication failed / Invalid login (535).</b></p>
<ul>
<li>Verify SMTP username is the full email address where required.</li>
<li>For Gmail and Microsoft 365, use an <b>app password</b> or SMTP-enabled account — normal login passwords often fail.</li>
<li>Match port and encryption: 587 + TLS, or 465 + SSL.</li>
<li>Re-enter password on provider edit and click <b>Send Test</b> before saving.</li>
</ul>

<p><b>Does Send Email use my unsaved edits on the provider form?</b></p>
<p><b>Send Test</b> on the provider edit screen uses current form values without saving. <b>Send Email</b> from documents uses the saved provider configuration — save provider changes before sending from invoices.</p>

<p><b>Is the signature included in test, manual, and automatic emails?</b></p>
<p>Yes. The HTML signature from the email provider is appended to test emails, manual Send Email messages, and automatic emails.</p>

<p><b>Does email work only in manual mode?</b></p>
<p>No. Email supports <b>both</b> manual and automatic modes. Manual mode uses the <b>Send Email</b> button and compose screen. Automatic mode sends when a document reaches a configured status — set up a Transaction Config with <b>Use for Manual Send</b> unchecked and a <b>Transaction Status</b> trigger. Both use the same provider and templates but require separate configs.</p>

<p><b>Why didn't automatic email send when I approved the invoice?</b></p>
<ul>
<li>Confirm an active automatic Transaction Config exists: <b>Use for Manual Send</b> unchecked, correct Transaction Type and Transaction Status, Channel <b>Email</b>.</li>
<li>Check that a <b>Recipient Rule</b> is linked and resolves a valid customer email.</li>
<li>Check <b>Transaction History</b> — the row may be Queued (waiting for delay) or Failed (see error message).</li>
<li>Ensure the background worker is running in your environment (emails stay in Queued status if the worker is not processing jobs).</li>
<li>Configs apply only to documents approved <b>after</b> the config was created — not retroactively.</li>
</ul>

<p><b>Can I use both manual and automatic email for Sale Invoice?</b></p>
<p>Yes. Create one config with <b>Use for Manual Send</b> checked (for the Send Email button) and a separate config with it unchecked and Transaction Status <b>Approved</b> (for automatic send on approve).</p>

<p><b>Are PDFs attached to the email?</b></p>
<p>Not as file attachments in this release. The email includes <b>download links</b> to PDFs (secure links). Recipients click the link to open or save the PDF.</p>

<p><b>Can I send to multiple To addresses?</b></p>
<p>Enter comma-separated addresses in <b>To</b>, <b>CC</b>, or <b>BCC</b> on the compose screen.</p>

<p><b>What's the difference from Notifications (bell icon)?</b></p>
<p><b>Notifications</b> under Settings is your in-app activity inbox. <b>Email notifications</b> send real emails through SMTP. They are separate features.</p>

<p><b>Why is {{companyName}} or another placeholder empty?</b></p>
<p>Placeholders only resolve when a matching <b>Template Parameter</b> row exists and the <b>Field Path</b> returns a value. Company name is not loaded from the document — add a parameter with <b>Parameter Name</b> <code>companyName</code> and a static <b>Default Value</b>, or type your company name directly in the subject. Verify field paths against <a href="#/features/email-notifications?id=template-parameters">Template parameters</a>.</p>

<p><b>How do I resend a failed email?</b></p>
<p>Open the document and use <b>Send Email</b> again after fixing the cause (SMTP, recipient address, etc.). Check Transaction History for the previous failure reason.</p>

<hr class="doc-section-divider">

<h2 id="related">Related Topics</h2>

<ul>
<li><a href="#/settings/notification-providers">Notification Providers</a></li>
<li><a href="#/settings/notification-templates">Notification Templates</a></li>
<li><a href="#/settings/notification-transaction-configs">Transaction Configs</a></li>
<li><a href="#/settings/notification-transaction-history">Transaction History</a></li>
<li><a href="#/settings/notification-recipient-rules">Recipient Rules</a></li>
<li><a href="#/sales/sale-invoice">Sale Invoice</a></li>
</ul>
