Skip to content
CirrusDocs

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.

The three streams
StreamForExtra rules
transactionalMail 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.
marketingNewsletters and updates a person subscribed to.Consent, one recipient per message, an unsubscribe link and your postal address.
promotionalOffers 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#

  1. A key with the campaign:write scope. Otherwise the request is refused with 403 stream_not_allowed.
  2. Every recipient must be a contact of your organisation, who is subscribed. Not pending double opt-in, not unsubscribed, not opted out of this category, not suppressed, and not a contact who bounced or complained.
  3. Their consent must be recorded with a lawful basis. A contact whose basis is unknown is refused unless your deployment allows it.
  4. They must not have reached the contact-frequency limit.
  5. Exactly one recipient in to, cc and bcc together (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.
  6. Your organisation must have set its postal address in the dashboard (422 postal_address_not_set).

Cirrus makes every marketing and promotional message unsubscribable when it sends it:

  • It adds the List-Unsubscribe and List-Unsubscribe-Post: List-Unsubscribe=One-Click headers (RFC 8058), so mail apps can show an unsubscribe button. Any value for those two headers in your own headers is 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.

Reasons a marketing or promotional recipient is refused
CodeMeaning
recipient_not_a_contactThe address is not a contact of your organisation.
consent_pendingThe contact has not yet confirmed a double opt-in.
consent_basis_unknownNo lawful basis is recorded for the contact.
recipient_unsubscribedThe contact unsubscribed.
category_opted_outThe contact opted out of this kind of mail.
recipient_suppressedThe address is on your suppression list.
contact_bouncedThe contact's address hard-bounced earlier.
contact_complainedThe contact marked an earlier email as spam.
frequency_limit_reachedThe 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.