---
title: "Follow email law"
description: "Consent, one-click unsubscribe, sender identity and a postal address under the mailbox providers' sender rules, CAN-SPAM, GDPR and ePrivacy, and which parts the package handles. Not legal advice."
canonical_url: "https://nuxt-backend.dev/docs/ship/compliance/email-law"
---
# Follow email law

> Consent, one-click unsubscribe, sender identity and a postal address under the mailbox providers' sender rules, CAN-SPAM, GDPR and ePrivacy, and which parts the package handles. Not legal advice.

Version: nuxt-backend 0.6.x · Tab: Ship · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

Two sets of rules decide whether your email is legal and whether it arrives. Laws (CAN-SPAM in the US, the GDPR and ePrivacy in the EU) say when you may send marketing and what it must contain. The big mailbox providers say what a sender must prove before they deliver its mail. In 0.2.0 the package sends transactional and marketing mail from separate addresses, puts a one-click unsubscribe and your postal address in every marketing email, and records each opt-in. Collecting consent the right way, and what you write, stays yours.

<warning>

**Not legal advice.** This summarizes the sources linked below as they read on 2026-10-25. The rules for consent differ by country, inside the EU too.

</warning>

## What the rules ask

### Transactional and marketing mail

A sign-in code, a receipt or a security alert is transactional: it answers something the person did, and needs no consent. A product announcement, a newsletter or a win-back offer is marketing. Mixing an offer into a receipt can make the whole email marketing, so keep them apart.

### The mailbox providers

<table>
<thead>
  <tr>
    <th>
      Provider
    </th>
    
    <th>
      Applies to
    </th>
    
    <th>
      Asks
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://support.google.com/a/answer/81126" rel="nofollow">
        Gmail
      </a>
    </td>
    
    <td>
      Every sender
    </td>
    
    <td>
      SPF or DKIM, valid forward and reverse DNS, TLS, and a spam rate under 0.3%
    </td>
  </tr>
  
  <tr>
    <td>
      Gmail and <a href="https://senders.yahooinc.com/best-practices/" rel="nofollow">
        Yahoo
      </a>
    </td>
    
    <td>
      More than 5,000 messages a day to their users
    </td>
    
    <td>
      SPF and DKIM, DMARC aligned with the From domain, one-click unsubscribe (<a href="https://www.rfc-editor.org/rfc/rfc8058" rel="nofollow">
        RFC 8058
      </a>
      
      ) on marketing, honored within 2 days, and a spam rate kept under 0.1%, never 0.3% (<a href="https://support.google.com/a/answer/14229414" rel="nofollow">
        FAQ
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://techcommunity.microsoft.com/blog/outlook/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high%E2%80%90volume-senders/4399730" rel="nofollow">
        Outlook.com
      </a>
    </td>
    
    <td>
      More than 5,000 messages a day, since 2025-05-05
    </td>
    
    <td>
      SPF, DKIM and DMARC (at least <code>
        p=none
      </code>
      
      ) aligned. Mail that fails goes to junk, then is rejected
    </td>
  </tr>
</tbody>
</table>

### The law in the US

[CAN-SPAM](https://www.ftc.gov/business-guidance/resources/can-spam-act-compliance-guide-business) applies to commercial email, with no size threshold:

- honest From, Reply-To and routing headers, and a subject that doesn't mislead;
- a clear statement that the message is an advertisement, unless the person opted in;
- your valid postal address;
- a way to opt out that works for at least 30 days after the send, honored within 10 business days.

### The law in the EU

- **Consent first.** Marketing email needs the person's prior consent ([ePrivacy Directive Art. 13(1)](https://eur-lex.europa.eu/eli/dir/2002/58/oj)). Consent must be freely given, specific and informed, and you must be able to prove it ([GDPR Art. 7](https://eur-lex.europa.eu/eli/reg/2016/679/oj)).
- **The soft opt-in.** You may email an existing customer about your own similar products without consent. You must have given them a clear chance to refuse when you collected the address, and in every message after (Art. 13(2)).
- **Double opt-in.** No article requires it. It is how you prove an address's owner agreed, and some authorities and courts, in Germany for example, expect it.

Canada's [CASL](https://crtc.gc.ca/eng/internet/anti.htm) also asks for consent, sender identity and an unsubscribe honored within 10 business days.

## Who answers for what

<table>
<thead>
  <tr>
    <th>
      The package, from 0.2.0
    </th>
    
    <th>
      You
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Transactional mail from <code>
        EMAIL_FROM
      </code>
      
      , marketing from <code>
        EMAIL_MARKETING_FROM
      </code>
      
      , on separate subdomains
    </td>
    
    <td>
      Own both subdomains, and set up SPF, DKIM and DMARC for each
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email sync
      </code>
      
       checks DMARC on both
    </td>
    
    <td>
      Move DMARC to <code>
        quarantine
      </code>
      
       or <code>
        reject
      </code>
      
       once reports are clean
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        List-Unsubscribe
      </code>
      
       and <code>
        List-Unsubscribe-Post
      </code>
      
       on every email sent under a topic, answered at <code>
        /email/unsubscribe
      </code>
    </td>
    
    <td>
      Never send marketing outside a topic
    </td>
  </tr>
  
  <tr>
    <td>
      The packaged unsubscribe page, and preferences on the profile
    </td>
    
    <td>
      Keep the topics' names and descriptions honest
    </td>
  </tr>
  
  <tr>
    <td>
      Double opt-in for newsletter topics
    </td>
    
    <td>
      Decide which topics need it
    </td>
  </tr>
  
  <tr>
    <td>
      The soft opt-in notice and refusal at checkout
    </td>
    
    <td>
      Use it only for your own similar products
    </td>
  </tr>
  
  <tr>
    <td>
      A consent record of every opt-in: topic, time and source
    </td>
    
    <td>
      Keep consent you collected elsewhere, and import it honestly
    </td>
  </tr>
  
  <tr>
    <td>
      Your postal address in the footer of every topic email; <code>
        doctor --prod
      </code>
      
       fails without it
    </td>
    
    <td>
      Give a real, current address
    </td>
  </tr>
  
  <tr>
    <td>
      A weekly cap, quiet hours, and no marketing after 180 days without engagement
    </td>
    
    <td>
      Keep your spam rate low
    </td>
  </tr>
</tbody>
</table>

## Send only with consent

<steps level="3">

### Separate the senders

Give each kind of mail its own address on its own subdomain ([Deliverability](https://nuxt-backend.dev/docs/build/email/delivery/deliverability)):

```bash [.env.local]
EMAIL_FROM="Panels <hello@mail.panels.example>"
EMAIL_MARKETING_FROM="Panels <news@news.panels.example>"
```

A spam complaint about a newsletter then can't stop sign-in codes from arriving.

### Declare your topics and your address

Every marketing email goes under a topic, and the brand carries your postal address ([Let people choose their emails](https://nuxt-backend.dev/docs/build/email/preferences)):

```ts [backend/email.ts]
import { setupEmail } from 'nuxt-backend/email'
import { components } from './_generated/api'

export const email = setupEmail(components, {
  brand: {
    name: 'Panels',
    address: 'Panels Studio Ltd, 1 Example Street, Dublin D02 XY45, Ireland',
  },
  topics: {
    productNews: {
      name: 'Product news',
      description: 'New features and launches, about once a month.',
      subscribedByDefault: false,
    },
  },
})
```

Keep `subscribedByDefault: false` for marketing, so people join on purpose. The brand can also live in app config, where your pages read it, as `appConfig.backend.brand` with its `address`: the module carries it to the backend ([Write the brand once](https://nuxt-backend.dev/docs/build/email/templates/theme#write-the-brand-once)).

### Create them at the email provider

```bash
npx nuxt-backend email sync
```

It creates the topics and checks DMARC on both senders. You should see each topic listed, and a warning for any domain without DMARC.

### Check before production

```bash
npx nuxt-backend doctor --prod
```

It fails when topics are declared and the brand has no postal address.

</steps>

## Limits

- **Consent you collected elsewhere.** An old list, a form on another site or an import carries no record in the package. Keep your own proof, or ask again.
- **The spam rate is yours.** The package can stop mail to people who don't engage. It can't make people want your email.
- **Local rules.** Some countries add their own: Germany's courts on double opt-in, or rules on calling a message "free". Check where your users are.

## Related

- [Let people choose their emails](https://nuxt-backend.dev/docs/build/email/preferences): topics, one-click unsubscribe and the preferences page.
- [Deliverability](https://nuxt-backend.dev/docs/build/email/delivery/deliverability): sender subdomains, SPF, DKIM and DMARC.
- [Send lifecycle emails](https://nuxt-backend.dev/docs/build/growth/engage/lifecycle-emails): caps, quiet hours and the sunset rule.
- [Resend](https://nuxt-backend.dev/docs/services/resend): the email provider's account, domains and region.
- [Compliance](https://nuxt-backend.dev/docs/ship/compliance): who answers for what.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
