Overview
MoeMail is a temporary (disposable) email service built with Next.js on the Cloudflare stack. It gives you throwaway addresses on your own domain to keep your real inbox away from spam and unwanted sign-ups — and because it runs on Cloudflare’s free tiers, you can self-host it at no cost. A public instance runs at moemail.app.
Key Features
- Privacy protection: disposable addresses shield your real email from spam and tracking
- Real-time inbox with automatic polling for new messages
- Flexible lifetimes: 1 hour, 24 hours, 3 days, or permanent addresses
- Automatic cleanup of expired mailboxes and messages
- Send email from temporary addresses (via Resend)
- Webhook notifications for new mail
- Role-based permissions and API-key access to an OpenAPI interface
- Agent-friendly CLI for automating email workflows
- PWA support, light/dark themes, and Chinese/English UI
- Free to self-host on Cloudflare
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Next.js (App Router) on Cloudflare Pages |
| Database | Cloudflare D1 with Drizzle ORM |
| Cloudflare Email Routing + Email Workers | |
| Auth | NextAuth with GitHub / Google login |
| UI | Tailwind CSS and Radix UI components |
Getting Started
Prerequisites: Node.js 18+, pnpm, Wrangler, and a Cloudflare account with a domain.
git clone https://github.com/beilunyang/moemail.git
cd moemail
pnpm install
cp wrangler.example.json wrangler.json
cp wrangler.email.example.json wrangler.email.json
cp wrangler.cleanup.example.json wrangler.cleanup.json
Fill in your D1 database name and ID plus the environment variables (auth secrets, OAuth credentials), then deploy with the bundled script:
pnpm dlx tsx ./scripts/deploy/index.ts
Automated deployment through GitHub Actions is also supported — push a tag or trigger the workflow manually. Finally, point an Email Routing catch-all rule for your domain at the email Worker.
Full guides, API docs, and a video tutorial are available on the project’s documentation site.
Use Cases
- Signing up for services without exposing your personal address
- Test inboxes for QA and automated end-to-end tests
- A branded disposable-mail service on your own domain
License
MIT License.