Sub topic 2
Consent: who you are allowed to email
This chapter assumes you know how email is sent and received, what an email service provider (ESP) does, and what a DNS record is. It covers the working model of consent and the errors that most often cause trouble. Legal detail comes in a later chapter. Here the goal is a practical rule for deciding who is on a list and why.
What consent means
Consent is the recipient's permission to receive a given kind of message from you. It has three parts:
- Who agreed: a specific person and address, not a guess.
- What they agreed to: for example "weekly newsletter" or "offers from this brand".
- When and how they agreed: a record you can show later.
Consent is tied to purpose. Someone who gives you an address to receive a receipt has not agreed to receive a monthly sale announcement.
How consent differs by email type
The three email types need different levels of permission.
| Email type | Permission usually needed | Typical source |
|---|---|---|
| Transactional | None beyond the user's own action | Sign-up, purchase, password reset request |
| Newsletter | Opt-in to that newsletter | Sign-up form for the newsletter |
| Promotional | Opt-in to marketing, or a lawful basis where the rules allow it | Marketing checkbox, campaign sign-up |
A transactional message is sent because the user did something. The action is the reason for the message. A newsletter or promotion is sent because you want to reach them, so you need their agreement.
The exact legal threshold varies by region. Some regions require prior opt-in. Others allow sending until the person opts out. Treat prior opt-in as the safe default, because it meets the strictest rules and also protects your sender reputation.
Single and double opt-in
Two common methods collect consent.
- Single opt-in: the person submits the form and is added to the list immediately.
- Double opt-in: the person submits the form, then clicks a confirmation link in an email before being added.
Double opt-in proves that the address belongs to the person who signed up. It stops people from subscribing someone else, and it filters out typos and fake addresses. The cost is a smaller list, because some people never confirm. Single opt-in grows faster but lets bad addresses in, and those lead to bounces and spam complaints.
What to record
Store a consent record for each subscriber. At minimum keep:
- The email address.
- The timestamp of the opt-in.
- The source, such as the form name or page URL.
- The wording shown at the time, or a version ID for it.
- The IP address, where your privacy policy allows it.
- The confirmation timestamp, if you use double opt-in.
Without this record, you cannot show where an address came from when a recipient or regulator asks.
Common errors
- Pre-ticked boxes. A marketing checkbox that is already checked is not a clear choice. Leave it empty.
- Bundled consent. "I accept the terms and want promotions" combines two decisions. Ask separately.
- Purchased or rented lists. These people never agreed to hear from you. Sending to them produces complaints, spam traps, and blocklisting.
- Scraped addresses. A published address is not permission to send marketing.
- Scope creep. Moving newsletter subscribers onto a promotional list without telling them goes beyond what they agreed to.
- Ignoring withdrawal. Consent can be taken back at any time. An unsubscribe must be honored, covered in a later chapter.
- Stale lists. Consent given years ago to an address you rarely emailed may no longer be a safe basis. Re-confirm or remove.
Keeping consent separate by purpose
A clean approach is to store consent per purpose rather than as a single "subscribed" flag. A small data model might look like this:
from dataclasses import dataclass
from datetime import datetime
@dataclass
class ConsentRecord:
email: str
purpose: str # "newsletter" or "promotions"
granted_at: datetime
source: str # form or page where it was given
wording_version: str # which consent text the person saw
confirmed_at: datetime | None = None
withdrawn_at: datetime | None = None
def may_send(record: ConsentRecord, purpose: str) -> bool:
return (
record.purpose == purpose
and record.confirmed_at is not None
and record.withdrawn_at is None
)
record = ConsentRecord(
email="[email protected]",
purpose="newsletter",
granted_at=datetime(2026, 11, 1, 9, 0),
source="/blog/signup",
wording_version="v3",
confirmed_at=datetime(2026, 11, 1, 9, 5),
)
print(may_send(record, "newsletter")) # True
print(may_send(record, "promotions")) # FalseThe newsletter record allows newsletters only. A person who wants offers must grant that purpose separately.
Exercise
A customer buys a product and ticks no marketing boxes. Two days later your team wants to email them a discount on a related product. Which kind of message is this, and what is missing?
Show answer
It is a promotional message. The purchase justifies the receipt and shipping updates, which are transactional, but it does not record agreement to receive marketing. You need an opt-in for promotions, stored with its source and timestamp, before sending the discount.
Exercise
Give two advantages and one drawback of double opt-in compared with single opt-in.
Show answer
Advantages: it proves the address belongs to the person who signed up, and it removes typos and fake addresses before they cause bounces or complaints. Drawback: the list grows more slowly, because some people never click the confirmation link.