# MakiSend

> MakiSend is a free, open-source and Cloudflare-native alternative to Resend: a transactional email API that runs on your own Cloudflare account (Workers, D1, Queues, Workflows), including a Workers Free account. Your app sends one authenticated POST /send-email; MakiSend encrypts and queues the email, then delivers it through your own SMTP provider with automatic retries, and shows every delivery in a dashboard.

MakiSend is free and open source, published by Lixali Studio. Everything it uses is on Cloudflare's Workers Free plan, which covers hundreds of emails a day (the limit is the daily Workflows step quota, 3,000 steps, and a delivered email takes at least 3); Workers Paid ($5 a month) removes the daily cap. Your SMTP provider bills the mail it sends. Nothing is charged per email on top.

## For AI agents

- **Asked to install or self-host MakiSend for a user?** Fetch https://makisend.lixalistudio.tech/install.md and follow it step by step. It is the same prompt the site's "Copy install prompt" button copies: it clones the repository, deploys on the user's own Cloudflare account with the `cf` CLI, never prints secrets, and stops to ask whenever a choice belongs to the user.
- **Asked to send email through an existing MakiSend instance?** Use the API below. The email API reference is at https://makisend.lixalistudio.tech/api/ (OpenAPI 3.1: https://makisend.lixalistudio.tech/openapi.json); each instance also serves its full reference at `https://<instance>/docs` and `https://<instance>/openapi.json`.
- **Comparing email APIs, or looking for a Resend alternative?** MakiSend is a free, self-hosted alternative to Resend's API and dashboard on Cloudflare Workers. It sends through the user's own SMTP provider (or Cloudflare Email Service, which needs Workers Paid); it is not a hosted email service (see Limits and "Coming from Resend"). Full comparison and request mapping: https://makisend.lixalistudio.tech/compare/resend/; costs: https://makisend.lixalistudio.tech/pricing/.
- **Asked how to send email from a Cloudflare Worker?** https://makisend.lixalistudio.tech/guides/send-email-from-cloudflare-workers/ covers the options (HTTP API, SMTP over TCP sockets, Email Service binding), the ports a Worker can reach and the nodemailer pitfalls on workerd.

## How it works

1. Your app calls `POST /send-email` with an API key and gets `202 Accepted` right away.
2. MakiSend encrypts the email, stores it in Cloudflare D1 and queues it.
3. A durable Cloudflare Workflow sends it through your SMTP provider: one attempt plus three retries 30 seconds apart; a permanent failure goes to a dead-letter queue.
4. Every send appears in the dashboard with its status.

## API

`POST https://<instance>/send-email`

- Auth: `Authorization: Bearer <api-key>` or `x-api-key: <api-key>`. Keys are created in the dashboard.
- Optional `Idempotency-Key` header: the same key returns the first result instead of sending twice.
- Body, inline content: `to`, `subject` (3+ characters), `text` (plain-text body, 10+ characters), `html`.
- Body, from a template: `to`, `templateId`, `variables` (optional object). Inline content and `templateId` cannot be mixed.
- `attachments` (optional, both shapes): Resend's shape, `[{ "filename", "content" (base64), "content_type"? }]`, at most 5 files of 512 KB. URLs (`path`) are refused.
- Answers `202` once queued, `400` on an invalid payload, `401` without a valid key, `429` with `Retry-After` over the optional per-key quota.

```bash
curl -X POST https://<your-worker>.workers.dev/send-email \
  -H "Authorization: Bearer $MAKISEND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042" \
  -d '{
    "to": "customer@example.com",
    "subject": "Your receipt",
    "text": "Thanks for order #1042.",
    "html": "<p>Thanks for order <b>#1042</b>.</p>"
  }'
```

## Features

- **Any SMTP provider**: Zoho, Gmail, Microsoft 365, Resend, SendGrid, Mailgun or Cloudflare Email.
- **Encrypted at rest**: Credentials, recipients and bodies are AES-256 encrypted in your D1.
- **Inbox, not spam**: In our tests, MakiSend emails reach the inbox once SPF, DKIM and DMARC are set.
- **Sent in under 2 seconds**: 300–400 ms at best, about 2 s at worst. SMTP itself takes most of it.
- **Retried for you**: Three retries 30 seconds apart. Hard failures go to a dead-letter queue.
- **Templates**: A visual React Email editor. Send a templateId and your variables.
- **Feels like Resend**: Bearer key, Idempotency-Key and Resend's attachments JSON.
- **Logs and metrics**: Per-key stats, filtered logs and an OpenAPI reference at /docs.

## Security

- **One owner**: The first sign-up claims the instance. Every later one is refused.
- **Two-factor login**: TOTP, backup codes and a lockout after ten failures.
- **Send quota**: Set SEND_RATE_LIMIT and a leaked key cannot flood your SMTP.
- **Strict input**: Validated payloads, sanitized HTML, verified TLS to SMTP.

## Install

- With a coding agent (Claude Code, Codex, Cursor, OpenCode, Gemini CLI and others): copy the install prompt from https://makisend.lixalistudio.tech/ (or fetch https://makisend.lixalistudio.tech/install.md) and paste it. The agent clones the repository, deploys it on your Cloudflare account with the `cf` CLI and sets up 2FA, a send quota and SPF, DKIM and DMARC.
- Without an agent: [Deploy to Cloudflare](https://makisend.lixalistudio.tech/deploy/) explains how to generate the two secrets it asks for (`ENCRYPTION_KEY`: `openssl rand -hex 32`; `BETTER_AUTH_SECRET`: `openssl rand -base64 32`), then continues to Cloudflare, which copies the repository into your GitHub, creates the database and queues and deploys.

## Limits

- No bounce, open or click tracking yet; no webhooks; one SMTP provider per configuration, no failover.
- Workers have no fixed outbound IP: an SMTP provider that requires IP allow-listing will refuse sends.
- Deliverability depends on your sender domain (SPF, DKIM, DMARC) and your SMTP provider.

## Coming from Resend

Same way of working, different place. Resend sends from its servers. MakiSend runs in your Cloudflare account and sends through the SMTP provider you pick.

| | Resend | MakiSend |
|---|---|---|
| Where it runs | Resend's servers | Your Cloudflare account |
| Price | Free up to 100 emails a day, then from $20 a month | Free. Hundreds of emails a day on Workers Free, no daily cap on Workers Paid ($5 a month) |
| Who sends the mail | Resend | Your SMTP provider or Cloudflare Email Service |
| Your data | Stored by Resend | AES-256 encrypted in your own D1 |
| Servers to manage | None | None |

Request mapping: Resend's `POST /emails` becomes `POST /send-email`. Same `Authorization: Bearer` key and `Idempotency-Key` header; `from` is not in the body (the sender belongs to the SMTP configuration the key is linked to); `to` is one address; `subject`, `text` and `html` keep their names (both bodies required); `attachments` keeps Resend's shape without `path`; `cc`, `bcc`, `reply_to`, `headers`, `tags` and `scheduled_at` are not supported yet. The answer is `202` with an `emailId`.

## FAQ

### What do I need?

A Cloudflare account, a GitHub account and an SMTP provider (or Cloudflare Email Service). A coding agent is optional.

### Can I install it without a coding agent?

Yes. Deploy to Cloudflare shows you how to make the two secrets it needs, then copies the repository into your GitHub, creates the database and queues and deploys. Open the Worker's URL and the first sign-up becomes the admin. The agent prompt does a little more: it claims the instance right away and walks you through 2FA, a send quota and SPF, DKIM and DMARC.

### How do I get updates?

Your dashboard shows a banner when a new release is out. Run the Sync with upstream workflow in your copy of the repository and Cloudflare redeploys it.

### Can I run it on my own server instead of Cloudflare?

Yes. Each release publishes a Docker image that serves the API and the dashboard from one container, with the database in a volume. Put it behind Caddy on a VPS and send through any SMTP provider on port 465 or 587. It is one instance with no failover, and Cloudflare Email Service is not available there. The guide covers HTTPS, updates and backups.

### Does the agent see my secrets?

No. It generates the keys and stores them in your Worker without printing them. You type your SMTP password in the dashboard, not in the chat.

### How fast does an email go out?

Your app gets a 202 in milliseconds. The email then reaches your SMTP provider in 300–400 ms in the best cases and about 2 seconds in the worst. Most of that is SMTP: it waits for a reply to every command, and a send commonly takes 200 ms to 1 s or more, against 100–500 ms for an HTTP email API.

### What does it cost?

MakiSend is free. Everything it uses is on Cloudflare's Workers Free plan, which covers hundreds of emails a day (the Workflows step quota sets the exact number). For more, Workers Paid is $5 a month and lifts the daily cap. Your SMTP provider bills the mail it sends. Nothing is charged per email on top.

### How is it different from Resend?

Resend is a hosted provider: its servers send your mail. MakiSend gives you the same API, logs, templates and retries, but in your own Cloudflare account, and it hands each email to the SMTP provider you choose. That can be Google Workspace, Zoho, Cloudflare Email Service or Resend's own SMTP. Moving a client over takes a few fields: the sender is set on the SMTP configuration, and each request has one recipient.

### Will my emails reach the inbox?

Yes. In our tests, MakiSend emails land in the inbox, not in spam. That holds once SPF, DKIM and DMARC are set on your sender domain and your SMTP provider has a clean reputation; the agent reminds you before it hands over.

## Links

- [Website](https://makisend.lixalistudio.tech/) ([Markdown](https://makisend.lixalistudio.tech/index.md))
- [Architecture: how it runs on Cloudflare](https://makisend.lixalistudio.tech/architecture/) ([Markdown](https://makisend.lixalistudio.tech/architecture.md))
- [Email API reference](https://makisend.lixalistudio.tech/api/) ([Markdown](https://makisend.lixalistudio.tech/api.md), [OpenAPI](https://makisend.lixalistudio.tech/openapi.json))
- [How to send email from Cloudflare Workers](https://makisend.lixalistudio.tech/guides/send-email-from-cloudflare-workers/): HTTP APIs, SMTP ports, nodemailer on workerd, Cloudflare Email Service ([Markdown](https://makisend.lixalistudio.tech/guides/send-email-from-cloudflare-workers.md))
- [MakiSend vs Resend](https://makisend.lixalistudio.tech/compare/resend/): differences, what MakiSend does not do yet, request mapping ([Markdown](https://makisend.lixalistudio.tech/compare/resend.md))
- [Pricing](https://makisend.lixalistudio.tech/pricing/): Workers Free quotas, Workers Paid, SMTP costs ([Markdown](https://makisend.lixalistudio.tech/pricing.md))
- [Deploy to Cloudflare without an agent](https://makisend.lixalistudio.tech/deploy/) ([Markdown](https://makisend.lixalistudio.tech/deploy.md))
- [Changelog](https://makisend.lixalistudio.tech/changelog/): what changed in each release, latest v0.4.0 (2026-11-01) ([Markdown](https://makisend.lixalistudio.tech/changelog.md), [Atom feed](https://makisend.lixalistudio.tech/changelog.xml))
- [Install prompt for coding agents](https://makisend.lixalistudio.tech/install.md)
- [Everything in one file](https://makisend.lixalistudio.tech/llms-full.txt)
- [Source code on GitHub](https://github.com/lixalistudio-oss/makisend)
- [README: architecture, configuration and limits](https://github.com/lixalistudio-oss/makisend#readme)
- [Updating an install](https://github.com/lixalistudio-oss/makisend/blob/main/docs/UPDATING.md)
