whatisgithub

What is mailflare?

hieunc229/mailflare — explained in plain English

Analysis updated 2026-05-18

208TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A self-hosted email inbox you deploy to Cloudflare, letting you receive and send mail on your own domain through a web interface with no server to manage.

Mindmap

mindmap
  root((Mailflare))
    What it does
      Self-hosted inbox
      Custom domain email
      No server to manage
    Features
      Inbox and folders
      Compose with drafts
      Search and filtering
      API keys for sending
    Tech stack
      Cloudflare Workers
      TypeScript
      D1 database
    Use cases
      Private email hosting
      Multiple mailboxes
      Programmatic sending

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run a private email inbox on your own domain without paying for hosted email

USE CASE 2

Create and manage multiple mailboxes under one domain through a single web dashboard

USE CASE 3

Send outbound mail programmatically using the built-in API keys

What is it built with?

TypeScriptCloudflare WorkersD1R2

How does it compare?

hieunc229/mailflareerezshahaf/loredennis960/backapp
Stars208208209
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs a Cloudflare account with a domain already added, plus a scoped API token for email routing and sending.

So what is it?

Mailflare is a self-hosted email inbox application that you can deploy to Cloudflare's infrastructure and use with your own domain names. It combines Cloudflare's email routing service with a web interface, so you can create and manage email addresses at any domain you control in Cloudflare and read and send mail through a browser. The application runs entirely on Cloudflare Workers, which means there is no server to maintain. When you add a domain, Mailflare calls Cloudflare's API behind the scenes to set up the DNS records needed for receiving and sending email, including the MX, SPF, and DKIM records that tell other mail servers your domain is legitimate. You can then create individual mailboxes under that domain, and incoming messages are routed to your Mailflare inbox automatically. The current feature set includes inbox, sent, drafts, spam, and trash folders, a compose window that saves drafts automatically, search and filtering across messages, message read status tracking, and an API key system for sending outbound mail programmatically. Deployment is a one-click process using Cloudflare's deployment tool, which provisions the database, storage bucket, and message queue the app needs. The roadmap lists several unfinished features, including AI assistance for the inbox. The planned email agent would classify incoming messages by intent and urgency, suggest replies, help triage incoming work, and remember context about ongoing threads and contacts. These features are described in detail in the roadmap but are not yet built. To set it up, you need a Cloudflare account with at least one domain already registered in Cloudflare, and you create an API token with permissions to manage email routing and sending on that domain. The README includes troubleshooting steps for the most common authentication errors during setup.

Copy-paste prompts

Prompt 1
Help me deploy Mailflare to Cloudflare and connect it to a domain I already manage there
Prompt 2
Walk me through creating a Cloudflare API token with the right permissions for Mailflare's email routing
Prompt 3
Help me troubleshoot a Cloudflare API 403 invalid access token error during Mailflare onboarding
Prompt 4
Show me how to rename the Mailflare Worker and update the matching wrangler.jsonc bindings

Frequently asked questions

What is mailflare?

A self-hosted email inbox you deploy to Cloudflare, letting you receive and send mail on your own domain through a web interface with no server to manage.

What language is mailflare written in?

Mainly TypeScript. The stack also includes TypeScript, Cloudflare Workers, D1.

How hard is mailflare to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mailflare for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.