> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Unsubscribes & Compliance

> Keep it legal. Mailofly handles unsubscribes automatically so you don't have to worry about it.

# Unsubscribes & Compliance ⚖️

Here's the thing: not everyone wants your emails forever. And that's totally fine! Respecting that is not just polite — it's also the law (CAN-SPAM, GDPR, and the Google/Yahoo sender requirements all require it).

The good news: Mailofly handles this for you automatically.

***

## The unsubscribe button at the top of Gmail

For every marketing campaign you send, Mailofly automatically adds the proper headers to make a native **"Unsubscribe"** button appear at the top of Gmail, Apple Mail, and Yahoo:

```http theme={null}
List-Unsubscribe: <https://api.mailofly.com/unsubscribe/u_abc123>, <mailto:unsub@inbound.mailofly.com>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
```

When someone clicks that button — they're unsubscribed instantly. No extra page, no confirmation flow, no friction. That's the way it should work, and it's what Google and Yahoo require as of 2024.

***

## Unsubscribe link in your email footer

Every campaign template also comes with an `{{unsubscribe_url}}` tag you can put in the footer:

```html theme={null}
<p>
  Not feeling these emails anymore?
  <a href="{{unsubscribe_url}}">Tap here to unsubscribe</a> — no hard feelings. 💙
</p>
```

When clicked, the contact's `unsubscribed` flag flips to `true` and they're added to your suppression list. Mailofly will never send them a campaign again.

***

## Does this apply to transactional emails?

Nope! Password resets, receipts, security alerts, and other transactional emails are **exempt** from unsubscribe requirements.

Think about it — if someone unsubscribed from all emails and then forgot their password, they'd still need to receive the "reset your password" email. That's fine. The compliance rules are about marketing, not critical account communication.

| Email Type | Unsubscribe Required? |
| :- | :- |
| Campaigns / Marketing | ✅ Yes — automatically handled |
| Transactional (receipts, resets, alerts) | 🚫 No |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.