# Limits, deadlines and batches

Needs the Mailset CLI, signed in: step 1 of `mailset guide onboarding`.

Each org's plan caps how many people outside it get its mail in a rolling 24 hours, and how many recipients its mail reaches in a minute. Past either cap, Mailset queues your product's mail instead of refusing it, and sends it once the window has room. Replace example.com with your domain.

## What waits and what's refused

- Queued: the day's cap, the minute's cap, the plan's month of outside email once it's used with no pay as you go or an empty balance (`mailset guide billing`), and mail from new and smaller accounts, which Mailset is holding for now to protect delivery for everyone. `send` answers `status: 'queued'`, `sendsAt` (when it should go out, in ms) and `reason`, in words.
- Refused at once, because waiting won't fix it: an org its brake paused (`forbidden`), an org that can't write outside its own domains yet (`forbidden`), and more recipients in one message than the plan allows (`invalid_input`).
- The day counts back 24 hours from now, not from midnight. Mail past the cap goes out as the sends that filled it turn a day old, and `sendsAt` says when that is.
- The caps: a trial sends to 100 people outside the org a day, 10 a minute. Paid: 2,000 a day, 100 a minute. With pay as you go on and a first paid month that no brake stopped: 10,000 a day, 200 a minute. `mailset sending status` shows your org's. Need more? Tell us what you send and how much at https://mailset.app/support, and we'll raise your org's limits.
- Campaigns never get the whole day. Mailset keeps a fifth of the day's cap, or 20 for each member if that's more, for people's mail, replies and your product's mail. On Paid with 10 members, campaigns reach up to 1,600 people a day and the other 400 stay free. Campaign mail past its share waits in its queue for room, and is never refused. `mailset sending status` shows `campaignsPerDay` and `campaignsToday`.

## Steps

1. Give mail that's useless late a deadline with `deliverBy`: a `Date`, or a time from now such as `'30s'`, `'10m'` or `'2h'`. Use it on sign-in codes, one-time links and alerts.

```ts
await mailset.send({
	from: 'Example <hello@example.com>',
	to: 'ana@example.org',
	subject: 'Your Example code',
	text: 'Your code is 123456.',
	deliverBy: '10m',
});
```

2. When a limit would hold that mail past its deadline, `send` throws a `MailsetError` with `code` `limit_reached` and `retryAt`, the soonest it could go. Offer the person another way in, or try again then.
3. Mailset drops mail still waiting when its deadline comes, and never sends it. The delivery log shows it as `expired` (`mailset delivery search --status expired`), and a hook on your server hears an `expired` event: `mailset guide product-events`.
4. To send many at once, pass an array. You get one result per message, in the same order, and a refusal is that message's `error` without stopping the rest:

```ts
const results = await mailset.send(receipts);
for (const result of results) if (!result.ok) console.error(result.error.code);
```

Any number goes. The SDK sends 100 at a time, at most 48 MB a call, and throws only when the key is refused or Mailset can't be reached before any of them was taken.

The docs have each of these whole, with the same call over HTTP for other languages: deadlines at https://mailset.app/docs/recipes/deadlines, batches at https://mailset.app/docs/recipes/batches, and every error and limit at https://mailset.app/docs/errors.

## Check

`mailset sending status` shows the org's plan, its caps and how many people outside it got its mail in the last 24 hours. `mailset delivery search --sender hello@example.com` shows what went out and what expired.

## Watch out

- A queued message is already Mailset's. Don't send it again: each `send` is a new message, and both would go.
- The deadline is read on Mailset's clock. Keep your server's clock right, and give a deadline of a minute or more.
- A paused org's mail is refused instead of queued, so nothing rushes out the moment the pause ends: `mailset guide brakes`.
- Mail people write in Mailset waits the same way. The web app's Scheduled folder lists it with why it waits and when it goes.

---

© 2026 Intenseloop, Inc. Mailset’s site, docs and guides are copyrighted. You may read them and use their code to build with Mailset. Don’t republish them or use them to build a copy of Mailset. Terms: https://mailset.app/terms#content