A lightweight, responsive email service built with Vue 3. Supports attachments, email routing, and can be deployed to Cloudflare for free! 🎉
Cloud Mail is a simple, self-hosted email service that allows you to create multiple email addresses with just a single domain—similar to Gmail or QQ Mail. Built to run entirely on Cloudflare Workers, Cloud Mail requires no server costs and uses Resend for reliable email delivery.
![]() |
![]() |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- 💰 Completely Free: No server needed. Deploy directly to Cloudflare Workers.
- 💻 Responsive UI: Fully responsive for both desktop and mobile.
- 📧 Advanced Email Sending: Send emails with embedded images, attachments, bulk support, and delivery status via Resend.
- 🛡️ Admin Panel: Manage users and emails with RBAC permission control.
- 🔀 Multi-Account Mode: Users can manage multiple email addresses under one account.
- 📦 Attachment Support: Receive and store attachments via Cloudflare R2.
- 🔔 Email Push: Forward incoming mail to Telegram bots or external email services.
- 📈 Data Visualization: Track usage and statistics using ECharts.
- ⭐ Starred Emails: Mark important emails for quick access.
- 🎨 Customizable: Configure site title, login background, and theme opacity.
- ⚙️ Feature Toggles: Enable/disable features like registration and mail sending.
- 🤖 Bot Protection: Integrated Turnstile CAPTCHA for human verification.
- 📜 More Features Coming Soon...
- Frontend: Vue 3, Element Plus
- Backend: Hono, Drizzle ORM
- Platform: Cloudflare Workers
- Email Provider: Resend
- Storage: Cloudflare R2
- Database: Cloudflare D1
- Cache: Cloudflare KV
- Node.js v18.20 or higher
- A Cloudflare account with a connected domain
git clone https://github.com/LaziestRen/cloud-mail
cd cloud-mail/mail-workernpm installEdit mail-worker/wrangler.toml:
[[d1_databases]]
binding = "db"
database_name = ""
database_id = ""
[[kv_namespaces]]
binding = "kv"
id = ""
[[r2_buckets]]
binding = "r2"
bucket_name = ""
[assets]
binding = "assets"
directory = "./dist"
[vars]
orm_log = false
domain = ["example.com"]
admin = "admin@example.com"
jwt_secret = "your_jwt_secret"- Create KV, D1, and R2 resources in the Cloudflare dashboard.
- Update
wrangler.tomlwith the correct IDs and names. - Deploy the project:
npm run deploy- Configure email routing:
- Cloudflare > Email > Routing > Catch-all → route to the Worker.
- Initialize the database:
- Visit:
https://yourdomain.com/api/init/your_jwt_secret
- Visit:
- Log in as admin and configure R2, Turnstile keys, etc.
npm run dev- Local D1 and R2 will auto-generate under
.wrangler/. - Initialize local DB via:
http://127.0.0.1:8787/api/init/your_jwt_secret - Set R2 domain to:
http://127.0.0.1:8787/api/file
- Sign up at resend.com
- Under Domains, add and verify your domain.
- Under API Keys, generate a token and paste it into the Cloud Mail settings.
- Under Webhooks, add:
https://yourdomain.com/api/webhooks
And enable these events:
- email.bounced
- email.complained
- email.delivered
- email.delivery_delayed
cloud-mail
├── mail-worker
│ ├── src
│ │ ├── api
│ │ ├── const
│ │ ├── email
│ │ ├── entity
│ │ ├── error
│ │ ├── hono
│ │ ├── init
│ │ ├── model
│ │ ├── security
│ │ ├── service
│ │ ├── utils
│ │ └── index.js
│ ├── package.json
│ └── wrangler.toml
└── mail-vue
├── src
│ ├── assets
│ ├── axios
│ ├── components
│ ├── layout
│ ├── request
│ ├── router
│ ├── store
│ ├── utils
│ ├── views
│ ├── app.vue
│ ├── main.js
│ └── style.css
├── package.json
└── env.dev
This project is licensed under the MIT License.
📢 Join our Telegram group: https://t.me/cloud_mail_tg








