Operations manual

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.

IntegrateEmailNewsletterReviewed November 2026

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

VariableUse
DJANGO_EMAIL_BACKENDSMTP backend, console backend or a provider backend.
DJANGO_EMAIL_HOST / PORTSMTP host and port.
DJANGO_EMAIL_HOST_USER / PASSWORDSMTP credentials.
DJANGO_EMAIL_USE_TLS / SSLChoose one transport mode.
DEFAULT_FROM_EMAILHouse sender identity.
TRANSACTIONAL_EMAIL_PROVIDERsmtp, 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 500

A/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/
SymptomLikely cause
Messages print to the logConsole backend or empty SMTP host.
Authentication failedWrong SMTP user/password or TLS mode.
Accepted but not deliveredSender domain, suppression or provider reputation.
Campaign partially sentA/B test or optimal-time queue still in progress.
Perfumz Operations Manual · English reference · Reviewed November 2026