Hey DEV Community! š
As developers, we've all been there: you're testing a signup flow, but you don't want to clutter your personal inbox, and existing disposable email services are either too slow, full of annoying ads, or charge a premium for basic API access.
I decided to solve this by building TTMAIL (trytempmail.co) ā a modern, privacy-focused, and incredibly fast temporary email platform built entirely on the edge.
š The Problem I Wanted to Solve
Most "Temp Mail" services use outdated PHP/MySQL stacks or heavy polling, leading to:
- High Latency: Waiting 30s+ for a verification email.
- Privacy Concerns: Logged data and trackers.
- No Developer DX: Hard to use in Playwright or Cypress tests without paying.
ā” The Tech Stack (Serverless Excellence)
I wanted zero maintenance and zero server bills. Here is how I achieved it:
- Framework: Next.js 15 (App Router)
- Runtime: Cloudflare Pages Functions
- Database: Cloudflare D1
- Email Ingestion: Cloudflare Email Routing
- Design: Neo-Brutalist UI using Tailwind CSS.
š Architecture Diagram
mermaid
graph LR
Sender[Email Sender] --> CF_MX[Cloudflare MX]
CF_MX --> Worker[Email Worker]
Worker --> D1[(Cloudflare D1 Edge SQLite)]
Client[Browser/CI Tool] --> API[Next.js API]
API --> D1
š Key Features for Power Users
1. ā” Sub-Second Speed
Because the database (D1) and the logic (Workers) live at the edge, emails are parsed and stored almost instantly.
2. š”ļø Privacy by Design (Zero Tracking)
Pixel Stripper: Our edge worker automatically neutralizes 1x1 tracking pixels.
Auto-Purge: Emails are automatically deleted every 90 days.
3. š¤ First-Class API for E2E Testing
Fetch emails programmatically in your CI/CD pipeline:
code
JavaScript
const response = await fetch('https://trytempmail.co/api/[email protected]');
const { emails } = await response.json();
console.log(emails[0].subject);
4. š Cross-Device Sync
Use a custom passphrase for any alias to restore your inbox on any device.
š Check it out!
Live Project: https://trytempmail.co
API Docs: https://trytempmail.co/api-docs
š¬ I'd Love Your Feedback!
UI/UX: What do you think of the Neo-Brutalist aesthetic?
Features: Would you find Webhook support useful?
Performance: How is the delivery speed in your region?
Drop a comment below! š
Top comments (1)
Useful angle for Playwright/Cypress. Fresh inbox per run beats a shared tempmail tab.
Curious how Email Routing holds up when 20 workers hit at once. That concurrency is where shared services usually flake.
Also worth thinking about retention and abuse. If the inbox lives forever, someone will use it for more than tests. Short TTL + rate limit keeps it a DX tool instead of a freeloader farm.