useSend

Self-hostable open source email platform built on Amazon SES with a full dashboard, SMTP relay, REST API, and multi-language SDKs.

4.4Kstars
384forks
GNU AGPLv3
TypeScript

useSend is a self-hostable, open source alternative to Resend, SendGrid, and Postmark that gives teams full control over their transactional and marketing email infrastructure. Built on Amazon SES, it provides a polished web dashboard for managing domains, monitoring delivery analytics, composing campaigns, and tracking suppression lists — all without being locked into a proprietary email vendor.

The platform ships with a WYSIWYG email editor built on Tiptap and jsx-email, enabling marketers to design and send campaigns without writing HTML. Developers interact with useSend through a REST API, an SMTP relay compatible with any framework, or official typed SDKs for TypeScript, Python, Go, and PHP. Scheduled email delivery, webhook event notifications, and double opt-in contact flows round out the feature set.

Architecturally, useSend is a TypeScript monorepo managed with pnpm and Turbo. The web application runs on Next.js 15 with Prisma for data access and BullMQ backed by Redis for async email queuing. The public API uses Hono with zod-openapi for automatic schema validation and Swagger UI documentation. A standalone SMTP server package bridges legacy integrations. The stack is clean, modular, and thoroughly tested with Vitest across unit, integration, and API layers.

Deployment is straightforward via Docker or Railway. The AGPLv3 license means the full source is available for inspection and self-hosting, though deploying modifications as a managed service requires sharing changes back. An active community of over 40 contributors ships releases at a pace of roughly two per month.

What You Get

  • Transactional Email API - A REST API and typed SDKs (TypeScript, Python, Go, PHP) for sending one-off emails programmatically from any stack, with support for HTML templates, attachments, CC/BCC, reply-to headers, and scheduled delivery.
  • Marketing Campaign Editor - A WYSIWYG drag-and-drop editor built on Tiptap and jsx-email that lets non-technical users design branded campaign emails with dynamic contact variables and unsubscribe placeholders compatible with major email clients.
  • SMTP Relay - A standalone SMTP server that accepts credentials from any application or framework and proxies delivery through SES, eliminating the need to adopt a new API for tools like WordPress, Supabase, or legacy applications.
  • Real-Time Delivery Dashboard - Searchable logs of every email sent, showing delivered, opened, clicked, bounced, and unsubscribed statuses per domain or API key, with time-series and reputation metric analytics endpoints.
  • Contact and List Management - Contact books with CSV import/export, per-contact property storage, double opt-in confirmation flows, and automatic subscription status sync from bounce and complaint events.
  • Suppression List - An automatically maintained blocklist of addresses that have hard-bounced or filed complaints, with API-based management and sync with AWS SES suppression to protect sender reputation.
  • Webhook Event Delivery - HTTP POST notifications for delivered, opened, clicked, and bounced events with configurable endpoints, retry logic, rate limiting backed by Redis atomic operations, and HMAC verification support.
  • Domain and API Key Management - Multi-domain support with DNS verification flows, API keys scoped to individual domains, and a team-based access model for managing multiple sending identities.

Common Use Cases

  • Bootstrapped SaaS transactional email - A founder replaces a $300/month Resend bill by deploying useSend on Railway in front of their existing AWS SES account, pointing the SDK at the new endpoint and cutting costs to AWS SES rates alone.
  • Self-hosted newsletter for an indie creator - A developer-blogger uses useSend’s campaign editor and contact book to send a weekly newsletter to 10k subscribers, maintaining full ownership of the subscriber list and open/click data without sharing it with a third-party ESP.
  • Email integration for a self-hosted app stack - A team running Supabase and a custom admin panel adds useSend’s SMTP relay to both tools via environment variables, unifying all outbound email through one dashboard and suppression list.
  • Marketing automation for a small e-commerce brand - A Shopify merchant uses the campaign scheduler and contact variable system to send personalized post-purchase sequences and re-engagement campaigns, triggered via the REST API from a lightweight backend workflow.
  • Compliance-sensitive enterprise deployment - A company with data residency requirements self-hosts useSend on their own infrastructure to ensure subscriber data never leaves their cloud region, using the AGPLv3 license as confirmation that the full codebase is auditable.

Under The Hood

Architecture useSend is structured as a Turborepo monorepo with clear separation between the Next.js web application, a standalone SMTP server, a shared email editor package, and multi-language SDKs. Within the web app, domain logic is organized into a service layer — distinct modules handle email sending, campaign scheduling, contact management, domain verification, suppression, webhook delivery, and billing — while route handlers in tRPC and Hono stay thin. BullMQ backed by Redis drives async email queuing, with separate queues for transactional messages and campaign batches. The public-facing API uses OpenAPIHono with zod-openapi, which enforces request and response schemas at the framework level and auto-generates a Swagger UI, eliminating manual contract maintenance. Auth middleware and rate limiting are applied as composable Hono middleware before any handler runs.

Tech Stack The web application is built on Next.js 15 with React 19, using Prisma as the ORM against a PostgreSQL database. The public REST API is served by Hono with full OpenAPI schema definitions via zod-openapi. BullMQ over Redis handles all asynchronous job queuing for email dispatch and campaign batching. The SMTP relay is a standalone Node.js service using the smtp-server and nodemailer packages. The visual email editor is an isolated package built on Tiptap (block-based rich text) and jsx-email (React-to-HTML email rendering). The monorepo is managed by pnpm workspaces and Turborepo for incremental builds. Deployment targets include Docker and Railway, with optional Cloudflare DNS integration for domain verification.

Code Quality The codebase demonstrates solid engineering discipline. Test coverage spans unit tests for individual service functions, tRPC router tests with mocked Prisma, Hono API tests against the router layer, and full integration tests that spin up a Dockerized Postgres database. Vitest is the test runner across all suites, with separate config files scoping each test tier. Error handling is structured around a typed UnsendApiError class that maps domain error codes to HTTP status codes deterministically, ensuring predictable responses. Prisma-generated types flow through the service layer without manual casting. Custom header sanitization, idempotency keys with atomic Redis operations, and namespace isolation for multi-tenant Redis clusters show attention to production edge cases. CI configuration runs the test suite and enforces linting on every pull request.

What Makes It Unique What distinguishes useSend from other self-hosted email tools is the combination of a production-quality campaign editor and a developer-grade API in a single deployable unit. Most open source email platforms focus on one — either a marketer-facing newsletter tool or a transactional API layer. useSend bridges both without requiring separate installations. The OpenAPI-first public API with embedded Swagger UI means API documentation is always in sync with the implementation. The SDK ecosystem covering four languages with consistent semantics lowers the integration barrier significantly. Finally, the use of Amazon SES as the delivery backend means operators inherit SES’s deliverability infrastructure while retaining full data ownership — a combination that is difficult to replicate with typical self-hosted MTAs.

Self-Hosting

useSend is released under the GNU Affero General Public License v3.0 (AGPLv3). This is a strong copyleft license that allows anyone to use, modify, and distribute the software freely, including for commercial purposes, but it carries a network use provision: if you modify useSend and provide access to it over a network — including running it as an internal tool for your company — you are required to make your modified source code available under the same license. For teams deploying useSend purely for their own internal email sending without offering it as a service to others, the practical implications are minimal. Organizations building a managed email service on top of useSend would need to comply with the copyleft terms.

Running useSend yourself requires a PostgreSQL database, a Redis instance, and an active Amazon AWS account with SES configured for your sending domains. The web application and the optional SMTP server each run as Docker containers, and a docker-compose file is provided for local development. Production deployments must handle database migrations (Prisma), environment variable management (AWS credentials, Redis connection strings, session secrets), and TLS termination. Railway is the officially documented easy path. At scale, you are responsible for SES sending limits, bounce handling, and ensuring your Redis and Postgres instances are durable and backed up. The operational surface is moderate — well-documented, but not trivial.

Compared to using Resend, SendGrid, or Postmark directly, self-hosting useSend gives you full data ownership, no per-email pricing tiers, and no vendor dependency, but it removes the managed deliverability expertise, SLA guarantees, and automatic reputation monitoring those services provide. There is no paid cloud tier of useSend itself — the project is fully community-driven. Support comes through Discord and GitHub Issues. Teams that need guaranteed uptime, proactive deliverability management, or dedicated technical support may find that a commercial ESP is more appropriate than self-hosting even an excellent open source tool like useSend.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search