6. Mass email¶
The big rule¶
You must respect marketing opt-in. Mass-email features have a default-on toggle that filters out customers who didn't opt-in for marketing. Don't turn that off unless the message is a transactional notice (a notice they need to receive regardless, e.g. "your order shipped", "the shop is moving to a new address").
Sending promotional content to non-opted-in customers is a GDPR violation. We will see fines.
Sending a mass email¶
Customers → Mass email.
-
Compose:
- Subject - the email subject line.
- HTML body - the full HTML. No template language - what you
paste is what gets sent. We have a few sample templates in
docs/templates/mass-email-samples/(TODO - for now, copy an old campaign).
-
Audience:
- Professions - tick boxes (Doctor, Skin therapist, Nurse, Dentist, Clinic owner). Empty = everyone. Multiple = OR (a customer matching any of the ticked ones is in).
- Require marketing opt-in - keep this on unless the email is transactional.
-
Preview audience - shows the count + a sample of 5 recipient emails. Always click this before sending.
- Send - confirms count, then ships. Goes out via Resend.
A campaign ID is generated; check Mass email → History for delivery + bounce info.
What gets logged¶
Every send creates a mass_email_campaigns record:
- Sender (which admin sent it).
- Subject line.
- Audience filter used.
- Recipient count + actual sent count + failure count.
- Sent timestamp.
We don't store the per-recipient delivery state in the database - Resend's dashboard has that, click through from the History page.
Newsletter sign-ups vs. customer accounts¶
Two different audiences:
- Newsletter subscribers - gave us their email via the storefront
newsletter form without making an account. Stored in
newsletter_subscribers. Always opt-in (that's why they submitted). - Customer accounts - have full accounts, may or may not have
opted in. Stored in
customers.marketing_opt_in.
The Mass email tool today targets customer accounts. To email newsletter-only subscribers, ask the dev team - we'll add a toggle when needed.
Tips¶
- Preview before sending. The audience count tells you whether your filter is doing what you think.
- Send to yourself first. Set the Audience filter to a profession
only your own test account has (e.g. add
developerprofession temporarily), preview, send. Read the email in your inbox. Then go back and remove the test filter before the real send. - Use the dev site for trial runs. All customer emails on the dev site are masked to fake addresses, so sending there is safe.
- Keep the body simple. Outlook is the worst - stick to inline CSS, simple table layouts, no JavaScript (gets stripped anyway).
- Don't send more than once a week. Customer fatigue is real.
- Hide unsubscribe - every email goes out with a unsubscribe footer added by Resend. Don't remove it.
Common gotchas¶
- No "schedule for later". The send happens when you click. If you want a scheduled send, ask the dev team - we'll add it if you need it routinely.
- No A/B testing built in. If you want to test subject lines, split your audience manually (e.g. half by profession).
- No templates yet. The HTML body is free-form. Copy from a previous send (Mass email → History → click an old campaign → copy body).