> For the complete documentation index, see [llms.txt](https://docs.mailofly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailofly.com/guides/campaigns-and-content/compose.md).

# Compose

**Compose** sends one-off email immediately — no campaign record, no schedule. Perfect for tests, announcements, and API-driven transactional mail.

**In the app:** Click **Compose** in the top bar or press `⇧M`

***

## When to use Compose vs Campaigns

| Use Compose when…                 | Use Campaigns when…       |
| --------------------------------- | ------------------------- |
| Sending to a handful of addresses | Targeting a whole segment |
| Testing templates or accounts     | You need run history      |
| API transactional sends           | Scheduling or automation  |
| No repeat sends planned           | Recurring newsletters     |

***

## Send from the app

1. Click **Compose** (top bar) or open command palette → "Compose email"
2. Select a **sending account**
3. Write **subject** and **body** — or load a saved [template](/guides/campaigns-and-content/templates.md)
4. Choose recipients:
   * **Manual** — type emails separated by commas, spaces, or new lines
   * **Contacts** — pick from your workspace
5. Fill any **custom merge variables** (`{{ promo_code }}`, etc.)
6. Send

Each delivery creates a row in [**Mail logs**](/guides/operations/mail-logs.md) with `campaign_id = null`.

***

## Merge tags

Same rules as [templates](/guides/campaigns-and-content/templates.md):

* Contact fields resolve automatically for saved contacts
* Manual recipients may prompt for field values matching tags in your content
* Custom tags require values before send

***

## Limits

| Limit                 | Value                                                          |
| --------------------- | -------------------------------------------------------------- |
| Recipients per batch  | **100** max                                                    |
| Variable value length | 4,000 characters                                               |
| Role required         | **Admin** to send                                              |
| Daily account quota   | Same as [sending accounts](/guides/deliverability/accounts.md) |

***

## Send via API

Use your account's **`acc_…` key** — not the API key:

```bash
curl -sS -X POST "https://www.mailofly.com/api/v1/compose" \
  -H "Authorization: Bearer mf_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "account_key": "acc_your_account_key",
    "template_id": "uuid-of-template",
    "recipients": {
      "emails": ["alex@example.com", "sam@example.com"]
    },
    "variables": {
      "promo_code": "SAVE20"
    }
  }'
```

Or inline subject + body instead of `template_id`:

```json
{
  "account_key": "acc_…",
  "subject": "Hello {{ first_name }}",
  "body": "<p>Your code: {{ promo_code }}</p>",
  "recipients": { "type": "contacts", "contact_ids": ["uuid-1", "uuid-2"] },
  "variables": { "promo_code": "SAVE20" }
}
```

Full reference: [API: Compose](https://docs.mailofly.com/api/compose)

***

## Related

* [Sending accounts](/guides/deliverability/accounts.md) — `acc_` keys and daily limits
* [Templates](/guides/campaigns-and-content/templates.md) — reusable content
* [Mail logs](/guides/operations/mail-logs.md) — verify delivery


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mailofly.com/guides/campaigns-and-content/compose.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
