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

# Email Types

> Transactional vs campaigns — what's the difference and when do you use each one?

# Email Types 📬

Mailofly handles two very different kinds of emails. They might look similar, but they serve totally different purposes. Let's break it down.

***

## Transactional emails

These are the "something just happened" emails. Your code triggers them when a user does something or when your system needs to notify someone.

Examples:

* 🔐 "Click here to reset your password"
* 🧾 "Here's your receipt for order #1234"
* 🎉 "Welcome! Your account is all set."
* 🚨 "Alert: someone logged into your account from a new device"

**How to send them:** Use the dashboard Compose, or call `POST /emails` from your code.

**What you need:**

1. An [API key](/docs/getting-started/api-keys.md)
2. A recipient email address
3. Your content (HTML or text)

→ [Sending examples](sending-examples.md) · [Node.js quickstart](/docs/getting-started/nodejs.md)

***

## Marketing campaigns

These go out to a whole list of people at once. You pick a segment of your contacts, write your email, and send (or schedule) it.

Examples:

* 📰 Your monthly newsletter
* 📣 "We just launched a new feature!"
* 🛍️ A sale or promotion to paying customers

**How to send them:** Go to **Campaigns** in the dashboard → pick a segment → compose → send.

→ [Campaigns guide](/docs/broadcasts/introduction.md)

***

## Side by side

| | Transactional | Campaigns |
| :- | :- | :- |
| **Triggered by** | Your code reacting to an event | You (manually or scheduled) |
| **Who gets it** | One person (or a small batch) | A whole segment |
| **Best for** | Receipts, alerts, confirmations | Newsletters, product updates, promos |
| **API endpoint** | `POST /emails` or `POST /emails/batch` | `POST /campaigns` |
| **Unsubscribe required?** | ❌ No | ✅ Yes (auto-handled) |


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