Integrate · 03
Email and newsletter
Email has two paths: transactional messages triggered by the platform, and newsletter campaigns sent to an audience. They share a sender identity but have separate delivery configuration and reporting.
Transactional email
Order, shipping, gift-card, password-reset, account, contact, refund, abandoned-cart and appointment messages are rendered from database templates. The mailer logs every attempt to EmailMessageLog and surfaces failures at /dashboard/emails/.
| Variable | Use |
|---|---|
DJANGO_EMAIL_BACKEND | SMTP backend, console backend or a provider backend. |
DJANGO_EMAIL_HOST / PORT | SMTP host and port. |
DJANGO_EMAIL_HOST_USER / PASSWORD | SMTP credentials. |
DJANGO_EMAIL_USE_TLS / SSL | Choose one transport mode. |
DEFAULT_FROM_EMAIL | House sender identity. |
TRANSACTIONAL_EMAIL_PROVIDER | smtp, resend, sendgrid, postmark or mailgun. |
Newsletter
Newsletter subscribers are stored locally with topics, consent and frequency. With NEWSLETTER_ESP=mailchimp and the API key/list ID, the sync command sends subscribers to Mailchimp and the webhook processes unsubscribe, bounce and profile updates.
NEWSLETTER_ESP=mailchimp
MAILCHIMP_API_KEY=...
MAILCHIMP_LIST_ID=...
MAILCHIMP_WEBHOOK_SECRET=...Mailchimp webhook URL: /newsletter/webhooks/mailchimp/<secret>/. Suppressed addresses are excluded from local sends.
Campaigns and automations
Campaigns support scheduled sends, A/B tests, optimal-time delivery and a linked follow-up to non-openers. Automations cover welcome, paid order, abandoned bag, back-in-stock and inactive-contact journeys. Both are driven by the jobs timer or the management commands.
python manage.py send_email_campaigns --limit 10
python manage.py run_email_automations
python manage.py sync_newsletter --limit 500A/B tests and optimal-time queues send in stages. Check the campaign report before assuming the full audience has been reached.
Email Studio
The design studio at /dashboard/emails/templates/ ships 30 section types across 12 collections, live preview, device frames, media picking, undo/redo and raw HTML mode. Legacy block templates are converted to sections when opened; transactional templates continue to render without a data migration.
Retries and diagnostics
retry_emails retries failed transactional messages. The jobs timer runs it every five minutes with the other due work. If delivery fails repeatedly, inspect the provider response, sender domain verification, suppression list and the resolved backend in the settings workbench.
python manage.py retry_emails --limit 100
curl -fsS http://127.0.0.1:8007/health/ready/| Symptom | Likely cause |
|---|---|
| Messages print to the log | Console backend or empty SMTP host. |
| Authentication failed | Wrong SMTP user/password or TLS mode. |
| Accepted but not delivered | Sender domain, suppression or provider reputation. |
| Campaign partially sent | A/B test or optimal-time queue still in progress. |