Open-source, multi-domain webmail, email API and webhooks that run entirely on your own Cloudflare account. One deployment serves any number of domains, mailboxes and people for the $5/month Workers Paid plan: no per-seat pricing, no API keys handed to a third party.
Website: https://gentlemail.dev · Deploy guide: https://gentlemail.dev/docs/deploy/ · Docs: https://gentlemail.dev/docs · Changelog
- Inbox and outbox: a real webmail for people (conversations, search, attachments, spam folder, blocking) and a REST API for code.
- Many domains, one deployment: add domains and mailboxes in Admin, and choose which people can open which mailboxes.
- Webhooks: signed
message.receivedandmessage.sentevents with retries, to automate invoices, support alerts and more. - AI assistants (MCP): connect Claude, ChatGPT or Cursor by signing in; they search, read and answer mail in the mailboxes you tick, and ask before sending.
- Your infrastructure: mail is stored in your own D1 database and R2 bucket, and sent with Cloudflare Email Service.
![]() |
![]() |
![]() |
| API keys and webhooks | On a phone | |
- Deploy. To keep an instance, clone this repository into your own and connect it to a Worker with Root directory
apps/mail: a release is then onegit pull. To try GentleMail, click Deploy to Cloudflare above: Cloudflare copies the app into a new repository on your GitHub account, creates the database and storage, asks for a one-timeSETUP_TOKEN, then builds and deploys. That copy doesn't follow our releases; updating it takes more steps. - Claim it. Open
/setupon your new Worker and create the admin account. - Connect a domain. Add it in Admin → Domains and run the three commands it shows.
- Create mailboxes and users, then send yourself a test message.
You need a Cloudflare account on Workers Paid and a domain whose DNS is on Cloudflare. The full guide (every step, configuration, an end-to-end test, updating and troubleshooting) is in apps/mail/README.md.
GentleMail never asks for a Cloudflare API token or account ID: it reaches D1, R2 and Email Service through Worker bindings. More on why.
A small pnpm workspace monorepo with one app today.
.
├── apps/
│ ├── mail/ the app: webmail, REST API and webhooks (one Cloudflare Worker)
│ └── docs/ the documentation site, served at gentlemail.dev/docs (Astro Starlight)
├── packages/
│ └── sdk/ the JavaScript SDK, published to npm as `gentlemail`
├── package.json workspace scripts
├── pnpm-lock.yaml
└── pnpm-workspace.yaml
apps/mail is the folder the Deploy button copies and the Root directory for Workers Builds. It has its own package.json, wrangler.jsonc and migrations. Its README has the tech stack (Workers, RedwoodSDK, D1 with plain SQL and no ORM, R2, Email Service), database and migration commands, a file-by-file layout and every script.
From the repository root:
pnpm install
pnpm dev:mail # local dev server, http://localhost:5173
pnpm --filter @emails/mail db:migrate:local # apply migrations to the local database
pnpm types # type-checkThe lockfile is the workspace's pnpm-lock.yaml, so pnpm is the tool for this repository. Inside apps/mail, the everyday scripts (dev, build, deploy, db:migrate:*) also run with npm; check and release call pnpm.
Missing something your product needs, like a mailboxes API, forwarding, or delivery to Telegram? Fork it and add it: mail comes in through apps/mail/src/lib/inbound.ts and goes out through apps/mail/src/lib/outbound.ts. Issues, discussions and pull requests are welcome.
MIT © Softwaiz




