Skip to content

rumsan/maile.uk

Repository files navigation

maile.uk

Free, instant disposable email addresses for developers. No signup. No configuration. Just use <anything>@maile.uk.

Live: https://maile.uk · API: https://api.maile.uk · Docs: https://docs.maile.uk


What it is

maile.uk is an open, developer-focused disposable email service. Every @maile.uk address is instantly available — visit the inbox URL and any email sent there appears in real time.

Use it for:

  • Testing email flows in development or CI/CD
  • Receiving one-time verification codes without creating accounts
  • Automating email-triggered workflows via webhooks
  • Safely sharing a throwaway address in public forums

⚠️ All inboxes are public — anyone who knows the address can read the mail. Do not send secrets, passwords, or sensitive personal data.


Features

Feature Description
No signup Any <name>@maile.uk works immediately
Real-time delivery Emails appear instantly via Server-Sent Events (no polling)
REST API Programmatic access to read, delete, and manage emails
Webhooks Browser-side (local) and server-side (remote) webhook delivery
Password protection Optional time-limited lock for an inbox
Self-destruct Auto-delete all inbox data after N hours
Audio notifications Optional chime when new mail arrives
Recent mailboxes Browser remembers last 5 visited inboxes
Mobile-friendly Responsive split-panel layout
Open source MIT licence — self-host or extend freely

Stack

Layer Technology
Email reception Cloudflare Email Routing → Worker
Storage Cloudflare R2 (raw .eml + parsed HTML/text)
Metadata Cloudflare D1 (SQLite via Drizzle ORM)
API Cloudflare Workers (Hono)
UI TanStack Start + React 19 + shadcn/ui + Tailwind CSS v4
Real-time Server-Sent Events (SSE)
Docs Astro Starlight
Monorepo Turborepo + pnpm workspaces

Project structure

maile.uk/
├── apps/
│   ├── web/       # Frontend (TanStack Start + React)
│   ├── api/       # Backend (Cloudflare Worker + Hono)
│   └── docs/      # Documentation site (Astro Starlight)
└── packages/
    ├── shared/    # Shared TypeScript types
    └── ui/        # Shared component library (shadcn/ui)

Local development

Prerequisites

  • Node.js ≥ 20
  • pnpm ≥ 9

Install dependencies

pnpm install

Start all apps

pnpm dev
App URL
Web http://localhost:3000
API http://localhost:8787
Docs http://localhost:4321

Run tests

# Web unit tests (jsdom + Vitest)
cd apps/web && npx vitest run

# API unit tests (Cloudflare Workers pool + Vitest)
cd apps/api && npx vitest run

Deployment

1. Deploy the API (Cloudflare Worker)

The API runs on Cloudflare Workers with D1 (SQLite) and R2 (object storage).

Create resources

# Create D1 database
wrangler d1 create maile-db

# Create R2 bucket for email storage
wrangler r2 bucket create maile-emails

Update apps/api/wrangler.toml with the IDs returned above.

Run migrations

cd apps/api
wrangler d1 migrations apply maile-db --remote

Set secrets

wrangler secret put ADMIN_PASSWORD   # Admin panel password

Configure environment variables in wrangler.toml

[vars]
EMAIL_TTL_HOURS     = "8"    # How long to keep emails (default: 8)
PASSWORD_TTL_HOURS  = "1"    # Password session lifetime (default: 1)
EMAIL_COUNT_CAP     = "50"   # Max emails per inbox (default: 50)

Deploy

cd apps/api
wrangler deploy

Configure Email Routing

In the Cloudflare dashboard for your domain:

  1. Go to EmailEmail Routing
  2. Enable Email Routing
  3. Add a catch-all rule: Action = Send to Worker, Destination = your deployed Worker

2. Deploy the Web app

The web app is a static site built with TanStack Start (Vite/Nitro). It can be deployed to Cloudflare Pages, Vercel, or any static host.

Set environment variable

# Point the UI to your deployed API
VITE_API_URL=https://api.maile.uk

Build

cd apps/web
pnpm build

Deploy to Cloudflare Pages

wrangler pages deploy .output/public --project-name maile-web

3. Deploy the Docs site

cd apps/docs
pnpm build
# Deploy the dist/ directory to any static host

Configuration reference

All settings can be changed at runtime via the admin API (no redeploy needed):

curl -X PUT https://api.maile.uk/admin/settings \
  -H "Authorization: Bearer $ADMIN_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"EMAIL_TTL_HOURS": "24", "EMAIL_COUNT_CAP": "100"}'
Setting Default Description
EMAIL_TTL_HOURS 8 Hours before emails are auto-deleted
PASSWORD_TTL_HOURS 1 Hours a password session remains valid
EMAIL_COUNT_CAP 50 Maximum emails stored per inbox

API quick reference

# List emails in an inbox
curl https://api.maile.uk/inbox/hello@maile.uk

# Get a specific email
curl https://api.maile.uk/inbox/hello@maile.uk/<email-id>

# Delete an email
curl -X DELETE https://api.maile.uk/inbox/hello@maile.uk/<email-id>

# Stream new emails in real time (SSE)
curl -N https://api.maile.uk/inbox/hello@maile.uk/stream

Full API documentation: https://docs.maile.uk


Contributing

Pull requests welcome. Please open an issue first for significant changes.

# Lint
pnpm lint

# Type check
pnpm typecheck

# Format
pnpm format

Licence

MIT — built with love by Rumsan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors