Manage Email Templates
This guide walks through editing email templates, using the visual editor, previewing changes, and sending test emails.
Before You Start
Section titled “Before You Start”- Log in as an admin at your site’s
/adminpath - Navigate to Email Templates in the sidebar
- Ensure you have access to an email inbox for testing
Selecting a Template
Section titled “Selecting a Template”The template list is organized into two categories:
- Platform — System emails that only admins can modify (verification, magic link, lead assignment)
- Customizable — Templates brokerages can override with their own branding (lead notification, tour confirmation, market report)
- Click a template name in the left sidebar
- Wait for the template to load (shows header with name and category badge)
- The URL updates to
#template-slugfor bookmarking
Editing the Subject Line
Section titled “Editing the Subject Line”The subject line supports variable substitution with autocomplete:
- Click in the Subject Line field
- Type
{to trigger the variable popover - Select a variable from the categorized list
- The variable is inserted as
{variable_name}
Alternatively, click the Insert variable button (icon next to the field) to open the picker directly.
Using the Visual Editor
Section titled “Using the Visual Editor”The visual editor uses GrapesJS with MJML support for drag-and-drop email design:
Adding Components
Section titled “Adding Components”- Open the Blocks panel (typically left side of editor)
- Drag MJML blocks onto the canvas:
mj-section— Container rowsmj-column— Column layoutsmj-text— Text contentmj-image— Images with src attributemj-button— Call-to-action buttons
- Click any component to select it
- Use the Style Manager panel to adjust colors, spacing, fonts
Editing Text Content
Section titled “Editing Text Content”- Double-click any text component to enter edit mode
- Type or paste your content
- Use
{variable_name}syntax to insert dynamic values - Click outside to exit edit mode
Using the Code Editor
Section titled “Using the Code Editor”For direct MJML editing:
- Click the MJML Code tab
- Edit the MJML source directly
- Use proper MJML tags (
<mj-section>,<mj-text>, etc.) - Switch back to Visual Editor to see rendered preview
When to use code mode:
- Fine-tuning responsive breakpoints
- Adding custom CSS via
<mj-style> - Debugging layout issues
- Copying templates between environments
Using Variables
Section titled “Using Variables”Variables enable dynamic content in templates. The Variables panel (right sidebar) shows all available variables for the current template:
Variable Categories
Section titled “Variable Categories”| Category | Example Variables |
|---|---|
| Recipient | client_name, user_email |
| Property | property_address, listing_price |
| Agent | agent_name, agent_phone_display |
| Brokerage | brokerage_name, brokerage_logo_url |
| Tour | tour_date, tour_time |
Inserting Variables
Section titled “Inserting Variables”- Click a variable chip in the Variables panel
- The variable is copied to clipboard as
{variable_name} - Paste into the subject line, visual editor, or code editor
Previewing Changes
Section titled “Previewing Changes”The Preview panel shows how the email will render:
- Make changes in the editor
- The preview updates with sample data
- Click the Refresh button to force-update if needed
- Scroll to see the full email layout
The preview uses sample data configured for each template (stored in preview_data).
Sending Test Emails
Section titled “Sending Test Emails”Before deploying changes, send a test email:
- Click Send Test button in the header
- Enter a recipient email address
- Click Send Test
- Check your inbox for the rendered email
Saving Changes
Section titled “Saving Changes”- Click Save (enabled only when changes exist)
- Wait for MJML compilation to complete
- Success toast confirms the save
- The “Unsaved” badge disappears
Saving triggers:
- MJML → HTML compilation
- Storage of compiled HTML for fast rendering
- Preview regeneration with new content
Template Reference Quick Links
Section titled “Template Reference Quick Links”| Template | Category | Purpose |
|---|---|---|
verification | Platform | Broker email verification |
magic_link | Platform | Passwordless login for favorites sync |
lead_assignment | Platform | Agent lead assignment notifications |
lead_notification | Customizable | New lead alerts to agents |
tour_confirmation | Customizable | Client tour confirmations |
market_report | Customizable | Market report delivery |
Troubleshooting
Section titled “Troubleshooting”Visual Editor Won’t Load
Section titled “Visual Editor Won’t Load”Symptoms: Blank canvas or “Failed to load visual editor” error
Solutions:
- Refresh the page and try again
- Switch to MJML Code tab as fallback
- Check browser console for JavaScript errors
- Ensure ad blockers aren’t blocking GrapesJS CDN
Preview Shows Broken Layout
Section titled “Preview Shows Broken Layout”Symptoms: Misaligned content or missing styles in preview
Solutions:
- Verify MJML syntax is valid (no unclosed tags)
- Check that all
mj-sectiontags havemj-columnchildren - Avoid using raw HTML outside MJML components
- Save and refresh to trigger recompilation
Variables Not Substituting
Section titled “Variables Not Substituting”Symptoms: Email shows literal {variable_name} text
Solutions:
- Verify variable name matches exactly (case-sensitive)
- Check that variable is defined in the template’s schema
- Ensure the sending code passes all required variables
- Review server logs for missing variable warnings
Test Email Not Received
Section titled “Test Email Not Received”Symptoms: No email in inbox after clicking Send Test
Solutions:
- Check spam/junk folder
- Verify recipient email address is correct
- Review server logs for SMTP errors
- Confirm email service (Resend, SendGrid) is configured
Related Documentation
Section titled “Related Documentation”- Email Template Architecture — How the MJML system works
- Email Template Variables — Complete variable reference