🚀 ZMAIL - 24-hour Temporary Email Service
English | 中文
If you find this project helpful, please consider giving it a ⭐️ Star ⭐️. Your support is greatly appreciated!
💌 Secure, Simple, Disposable Email Service
🌐 Live Demo • ✨ Features • 🚀 Deployment • 💻 Development • 🔧 Tech Stack
📹 Video Tutorial
- Project Introduction and Feature Demonstration
- Detailed Steps for Integrated Worker Deployment to Cloudflare
- How to Fork the Project and Customize Configuration
- Configuring Cloudflare Email Routing
- Setting up Environment Variables and D1 Database
✨ Features
✨ Instant Creation
Get a temporary email address instantly, no registration required
🔒 Privacy Protection
Protect your real email from spam and data leaks
⚡ Real-time Reception
Receive emails in real-time without refreshing the page
🌐 Global Availability
Built on Cloudflare's global edge network for fast access worldwide
🔄 Auto-refresh
Automatically check for new emails, never miss important messages
📱 Responsive Design
Perfect fit for all devices, from mobile to desktop
🚀 Quick Deployment
ZMAIL now adopts a brand new integrated deployment approach, with frontend and backend integrated into a single Cloudflare Worker, making deployment even simpler!
🎯 Deployment Options
We provide two deployment methods, you can choose according to your needs:
Option 1: One-Click Deployment (Recommended for Beginners)
✅ Advantages:
- Simple deployment, one-click completion
- No need to modify configuration files
- Perfect for quick testing
❌ Disadvantages:
- Cannot receive subsequent code updates
- Need to manually bind custom domain
📋 Deployment Steps:
- Click the "Deploy to Cloudflare" button above
- Follow the page instructions to connect your GitHub account
- Fill in application name and database name
- In Advanced Settings -> Build Variables, set:
VITE_EMAIL_DOMAIN: Your domain list, separated by ',' (e.g., mdzz.uk,zaunist.com)
- Click "Create and Deploy"
- After deployment, bind custom domain in Cloudflare Workers dashboard
- Configure Cloudflare Email routing to forward emails to your Worker
Option 2: Fork and Custom Deployment (Recommended for Advanced Users)
✅ Advantages:
- Can receive subsequent code updates
- Fully customizable configuration
- Better version control
❌ Disadvantages:
- Need to manually modify configuration files
- Requires some technical knowledge
- Need to manually create database
📋 Deployment Steps:
- Fork this project to your GitHub account
- Create a D1 database in Cloudflare Dashboard, remember the database name and id
- Modify the
wrangler.tomlfile in the root directory:- Modify
nameto your application name (optional) - Modify
routeswith your custom domain (required! Default worker.dev domain is not accessible in mainland China) - Modify
database_nameanddatabase_idto your D1 database information (required!) - Modify
VITE_EMAIL_DOMAINto your domain list (optional, just for convenient copy-paste of email addresses on the webpage, doesn't affect email reception)
- Modify
- In Cloudflare Dashboard, select "Workers & Pages"
- Click "Create application" -> "Pages" -> "Connect to Git"
- Select your forked repository
- Configure build settings (usually auto-detected)
- Click "Save and Deploy"
- Configure Cloudflare Email routing to forward emails to your Worker
📧 Configure Email Routing
Regardless of which deployment method you choose, you need to configure Cloudflare Email routing:
- Find your domain in the Cloudflare dashboard
- Go to "Email" -> "Email Routing"
- Enable Email Routing
- Add routing rules:
- Match type: "Catch-all address"
- Action: "Send to a Worker"
- Select your deployed Worker
- If you have multiple domains, repeat the above steps for each domain
💻 Local Development
🚀 Development
# install dependencies
pnpm install
# start frontend development server
pnpm dev:frontend
# start backend development server
pnpm dev:backend
⚙️ Deployment
# deploy
pnpm run deploy
🔧 Tech Stack
🎨 Frontend
- React - UI library
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Vite - Modern frontend build tool
⚙️ Backend
- Cloudflare Workers - Edge computing platform
- Cloudflare D1 - Edge SQL database
- Cloudflare Email Workers - Email processing service
👥 Contributing
Contributions via Pull Requests or Issues are welcome!
⭐ Support This Project
If this project has been helpful to you, or if you like it, please give it a Star ⭐️
Your support motivates me to make continuous improvements!