Skip to the documentation
Client

Mailbox SDK

Put the mailbox in your own app. Send and read mail as the person signed in, from a browser, a phone or a server.

What it is

@nextmail/mailbox is the Mailbox surface of the Nextmail API, for an app a person signs in to: their mail and threads, drafts, labels, calendars, contacts, automations, tasks, rules, templates and the workspace screens around them. It is built on @nextmail/sdk, taking its transport from it, so every call, error and retry behaves the same, and it adds one rule: it acts as a person, with their access token, and never with an API key. For anything infrastructure-shaped, domains, webhooks, keys, tracking and sending, use @nextmail/sdk itself.

pnpm add @nextmail/mailbox
send-email.ts
import { createClient } from '@nextmail/mailbox' const client = createClient({  accessToken: () => fetch('/api/mail-token').then((response) => response.text()),}) await client.emails.send({  from: '[email protected]',  to: '[email protected]',  subject: 'Tomorrow',  html: '<p>Still on for ten?</p>',})

Which SDK to use

`@nextmail/sdk``@nextmail/mailbox`
Acts asThe workspace, with an API keyThe person signed in, with an access token
RunsOn a serverIn a browser, in a phone app or on a server
ReachesSending, domains, webhooks, keys, tracking and the rest of the infrastructureMail and threads, drafts, labels, calendars, contacts, automations, tasks and templates
Use it forYour backend, jobs and the sending infrastructureA mailbox inside your product

Where to go

Give it an address.
Watch it work.

MCP, the API and the command line come with every plan, the free one included. Connect a client and approve exactly what it reaches.

Read https://nextmail.sh/agent.md and follow it. Then tell me what I need to do to sign you in to my Nextmail mailbox. If I have no account yet, create one with my address and ask me for the code that arrives. Wait for my go-ahead before you send anything.

© 2026 Nextmail. All rights reserved.