> ## Documentation Index
> Fetch the complete documentation index at: https://help-loyalife.xoxoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Send rich HTML emails via SendGrid with a drag-and-drop editor, personalisation variables, scheduling, and delivery analytics.

Email is the most flexible channel in the Communications module. It supports rich HTML layouts, images, and buttons, with a visual drag-and-drop editor for building templates without writing code.

**Provider:** SendGrid by Twilio

## Editor options

| Mode              | When to use                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Drag-and-drop** | Visual block editor (GrapeJS) — add text, images, buttons, dividers, and multi-column layouts without writing HTML |
| **Raw HTML**      | Paste or upload a pre-built HTML file for full control                                                             |

Both modes support `{{variables}}` anywhere in the subject or body. You can switch between modes; switching to HTML preserves the rendered output.

## Configuration fields

| Field                 | Required | Notes                                                                               |
| --------------------- | -------- | ----------------------------------------------------------------------------------- |
| Subject line          | Yes      | Supports variables (e.g. `Hi {{member_name}}, you earned {{points_earned}} points`) |
| Body / HTML           | Yes      | Full email content                                                                  |
| Header image          | No       | Displayed at the top of the email                                                   |
| Call-to-action button | No       | Configure button text, link URL, and colour                                         |

## Previewing and testing

The editor renders a live preview alongside the content editor. Switch between **Desktop**, **Tablet**, and **Mobile** views to verify layout at different screen widths.

Use **Send Test Email** to dispatch the template to a specific member's registered email address. Variables are substituted with real data from that member's profile in the test send.

## Scheduling

For **Promotional** templates, set a scheduled send date to delay delivery:

* The date must be in the future at the time of saving
* The date must fall within the linked campaign's active window
* Leave blank to send immediately when the campaign activates

**Transactional** templates always fire immediately when the trigger event occurs — scheduling does not apply.

## Delivery analytics

Each template's detail view shows delivery metrics over selectable time windows (7 days, 30 days, 3 months, 6 months):

| Metric           | Description                                    |
| ---------------- | ---------------------------------------------- |
| Total sent       | Number of emails dispatched                    |
| Delivered        | Emails accepted by the recipient's mail server |
| Failed / bounced | Emails that could not be delivered             |

## Troubleshooting

**Member is not receiving the email.**

* Confirm the member's email address is registered and valid in their profile.
* Check the template is Active and linked to the correct event.
* Review the delivery log on the member's profile (**Account Info → Communications**) for bounce or failure status.
* Ask the member to check their spam or junk folder — transactional emails from a new sender domain may be filtered on first receipt.

**Template is not going live after saving.**

* If Maker-Checker is enabled for Communications, the template enters Pending status and requires approver authorisation before it activates.

<Accordion title="Best practices">
  - Include the member's name or a specific points figure in the subject line — these improve open rates.
  - Put the most important information and the call-to-action above the fold.
  - For points-expiry emails, send at 30 days and again at 7 days before expiry.
  - Test in both light and dark mode — header images should be legible in both.
  - Keep subject lines under 50 characters to avoid truncation in mobile inboxes.
</Accordion>
