Quick Start
Get started with CloakMail disposable email service
Quick Start
This guide will walk you through using CloakMail for disposable email addresses.
This guide assumes you have CloakMail already deployed. If not, pick one of the two deployment paths below first, then come back here.
Deployment Options
CloakMail ships with two independent deployment paths. Pick whichever fits your situation — they don't interact, and you can run both for different domains.
Option 1 — Cloudflare Workers (fastest, free tier)
Run CloakMail entirely on Cloudflare's free tier — no servers, no Docker, no SSH. One command from any directory:
bunx cloakmail-cli setupThe cloakmail-cli wizard provisions D1 + R2, deploys both Workers, configures Email Routing, binds your custom domain, and verifies the whole thing — in about two minutes. Free tier supports ~100k emails/day.
Prerequisites: a Cloudflare account, a domain already on Cloudflare DNS, and Bun installed locally.
See the full Cloudflare deployment guide for API token scopes, architecture details, and advanced flags.
Option 2 — Docker / VPS (full control)
Pull and run directly from GitHub Container Registry on any server with Docker:
curl -fsSL https://raw.githubusercontent.com/DreamsHive/cloakmail/main/docker-compose.yml -o docker-compose.yml
export DOMAIN=yourdomain.com
docker compose up -dSee the installation guide for prerequisites and the Docker deployment guide for production tuning.
Using the Web UI
1. Access the Web Interface
Open your browser and navigate to your CloakMail instance:
http://localhost:51732. Generate an Inbox
Click the "Generate Inbox" button. You'll instantly receive:
- A unique email address (e.g.,
random123@mail.example.com) - An inbox that automatically expires based on your TTL settings
3. Receive Emails
Use the generated email address anywhere you need a temporary email. All incoming emails will appear in your inbox in real-time.
4. View and Manage Emails
- Click on any email to view its full content
- Delete individual emails or the entire inbox
- Copy the email address to clipboard
Using the API
You can also interact with CloakMail programmatically via the REST API.
Get Emails for an Inbox
After sending emails to your generated address, retrieve them:
curl http://localhost:3000/api/inbox/random123@mail.example.comResponse:
{
"emails": [
{
"id": "abc123",
"to": "random123@mail.example.com",
"from": "sender@example.com",
"subject": "Welcome!",
"text": "Hello...",
"html": "<p>Hello...</p>",
"receivedAt": "2024-01-15T10:35:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1,
"hasMore": false
}
}Get a Specific Email
curl http://localhost:3000/api/email/abc123Delete an Inbox
curl -X DELETE http://localhost:3000/api/inbox/random123@mail.example.comHow It Works
- Generate an address — Use the web UI or any address at your configured domain
- Use the address — Sign up for services, receive verification codes, etc.
- Check your inbox — Emails appear instantly via the web UI or API
- Auto-cleanup — Emails are automatically deleted after the configured TTL
Inboxes are created automatically when emails are received. Any address at your configured domain will work.
Common Use Cases
Testing Signups
Use CloakMail to test registration flows without using real email addresses
Avoiding Spam
Generate temporary addresses for one-time signups to newsletters or services
Development
Test email functionality in your applications without sending real emails
Privacy
Keep your real email address private when signing up for services
Next Steps
- API Reference — Full API documentation
- Configuration — Customize your instance
- TTL Settings — Configure email expiration