Limits, deadlines and batches

What waits for a limit, deadlines for codes, and sending many at once.

mailset guide sending-limits
4 stepsOn this page
  1. What waits and what's refused
  2. Steps
  3. Setup
  4. 1Give urgent mail a deadline
  5. 2Catch what a limit refuses
  6. 3Find mail that expired
  7. 4Send many in one call
  8. Check
  9. Watch out

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 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. Install the CLI and sign in

    Sign inSign in with a passkey

    Press Sign in with a passkey and approve it on this device, your phone or a password manager. Mailset has no passwords.

    Open in Mailset

    The command

    Install the CLI on macOS or Linux with brew install intenseloop/tap/mailset or npm install -g @mailset/cli.

    Run mailset login, open the link it prints and approve with your passkey.

    In a terminal, login also offers your agents the Mailset skill; mailset agents add does it later.

    Install the CLI on macOS or Linux with brew install intenseloop/tap/mailset or npm install -g @mailset/cli.

    Run mailset login, open the link it prints and approve with your passkey.

    In a terminal, login also offers your agents the Mailset skill; mailset agents add does it later.

  2. Give urgent mail a deadline

    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.

    await mailset.send({
    	from: 'Example <moc.elpmaxe@olleh>',
    	to: 'gro.elpmaxe@ana',
    	subject: 'Your Example code',
    	text: 'Your code is 123456.',
    	deliverBy: '10m',
    });
    
    deliverBy
  3. Catch what a limit refuses

    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.

    Sending limits
  4. Find mail that expired

    SettingsDeliveryStatus

    Set Status to Expired and search. The log lists the mail Mailset dropped when its deadline passed, none of which went out.

    Open in Mailset

    The command

    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.

    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.

  5. Send many in one call

    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:

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

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 mailset.app/docs/recipes/deadlines, batches at mailset.app/docs/recipes/batches, and every error and limit at 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 moc.elpmaxe@olleh 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.