Guides
Marketing and promotional email
The extra rules for newsletters and offers: consent, one recipient per message, and the unsubscribe link.
Three streams#
Every email belongs to a stream, set with the stream field. Streams keep different kinds of mail apart, so a problem with a newsletter cannot hold back a password reset: they do not share sending controls.
| Stream | For | Extra rules |
|---|---|---|
transactional | Mail a person asked for by doing something: receipts, password resets, shipping notices. The default. | None beyond the basics: organisation, domain, sender and suppression list. Sent exactly as you submit it. |
marketing | Newsletters and updates a person subscribed to. | Consent, one recipient per message, an unsubscribe link and your postal address. |
promotional | Offers and sales. | The same as marketing. |
If you do not set stream, the message is transactional. When you send a template, the stream is the template's category, and a stream you give must match it.
What a marketing or promotional send needs#
- A key with the
campaign:writescope. Otherwise the request is refused with403 stream_not_allowed. - Every recipient must be a contact of your organisation, who is
subscribed. Notpendingdouble opt-in, not unsubscribed, not opted out of this category, not suppressed, and not a contact who bounced or complained. - Their consent must be recorded with a lawful basis. A contact whose basis is
unknownis refused unless your deployment allows it. - They must not have reached the contact-frequency limit.
- Exactly one recipient in
to,ccandbcctogether (422 single_recipient_required), because the message carries that person's own unsubscribe link. To reach several people, put one message each in a batch. - Your organisation must have set its postal address in the dashboard (
422 postal_address_not_set).
The unsubscribe link and footer#
Cirrus makes every marketing and promotional message unsubscribable when it sends it:
- It adds the
List-UnsubscribeandList-Unsubscribe-Post: List-Unsubscribe=One-Clickheaders (RFC 8058), so mail apps can show an unsubscribe button. Any value for those two headers in your ownheadersis replaced, not merged. - It adds a footer to the HTML and the text part, with an unsubscribe link, a link to the recipient's email preferences and your postal address.
To place these yourself, write {{unsubscribe_url}}, {{preferences_url}} and {{postal_address}} in the body (spaces inside the braces are allowed). They are filled in and, in the HTML part, escaped. A part that contains {{unsubscribe_url}} gets no footer, so it must show the postal address too, or the request is refused with 422 business_identification_missing.
When a recipient is refused#
A refused recipient refuses the whole request: you get a 403 with the reason as the error code and the recipient in details, and nothing is stored. The checks run again at the moment of sending. A recipient who unsubscribed in between, by any means including the one-click link, is cancelled with the reason instead.
| Code | Meaning |
|---|---|
recipient_not_a_contact | The address is not a contact of your organisation. |
consent_pending | The contact has not yet confirmed a double opt-in. |
consent_basis_unknown | No lawful basis is recorded for the contact. |
recipient_unsubscribed | The contact unsubscribed. |
category_opted_out | The contact opted out of this kind of mail. |
recipient_suppressed | The address is on your suppression list. |
contact_bounced | The contact's address hard-bounced earlier. |
contact_complained | The contact marked an earlier email as spam. |
frequency_limit_reached | The contact has already received as many emails as the limit allows. |
Opens and clicks#
Marketing and promotional email is tracked: the platform records opens and clicks and reports them as opened and clicked events. They are signals, not proof that anyone read the message, and each carries a classification (human, a proxy such as an image cache, or a suspected bot). Webhook endpoints receive email.opened and email.clicked only if they name them. See Webhooks and signatures.