I built a disposable email service that costs $0 to run — here's the stack and the real numbers
I built a disposable email service that costs $0 to run — here’s the stack and the real numbers
我构建了一个零成本运行的临时邮箱服务——以下是技术栈和真实数据
Six weeks ago I was building an auth flow and needed a throwaway inbox to test if the password reset email actually arrived. I opened a temp email site, navigated past three ad banners, got a random address, and waited. That workflow was broken enough that I built the infrastructure myself instead. Here’s what I built, what it cost, and what happened after. 六周前,我在构建一个身份验证流程时,需要一个临时收件箱来测试密码重置邮件是否能正常送达。我打开了一个临时邮箱网站,在避开三个广告横幅后获得了一个随机地址,然后开始等待。这种工作流实在太糟糕了,于是我决定自己动手构建一套基础设施。以下是我构建的内容、成本以及后续的情况。
The problem in one sentence: Every developer testing email flows either mocks the email (wrong), runs a local SMTP server (overkill), or uses a throwaway email site with ads (terrible DX). None of these are good answers. 一句话概括问题:每个测试邮件流程的开发者,要么选择模拟邮件(方法错误),要么运行本地 SMTP 服务器(大材小用),要么使用带有广告的临时邮箱网站(开发体验极差)。这些都不是好的解决方案。
The stack — chosen for $0 idle cost
技术栈——基于零闲置成本的选择
Every service in the stack was chosen with one constraint: it must cost nothing at zero traffic and scale automatically when traffic arrives. 技术栈中的每一项服务都遵循一个约束:在零流量时必须零成本,且在流量到来时能自动扩展。
| Layer | Service | Free tier |
|---|---|---|
| Email interception | Cloudflare Email Routing | Unlimited |
| Serverless logic | Cloudflare Workers | 100k req/day |
| AI spam filter | Cloudflare Workers AI | Generous |
| Database | Upstash Redis | 10k commands/day |
| Frontend | Next.js on Vercel | Generous |
| Domain (routing) | zerodrop-sandbox.online | ₹89/year |
| Domain (brand) | zerodrop.dev | ₹1,500/year |
| 层级 | 服务 | 免费额度 |
|---|---|---|
| 邮件拦截 | Cloudflare Email Routing | 无限制 |
| 无服务器逻辑 | Cloudflare Workers | 每天 10 万次请求 |
| AI 垃圾邮件过滤 | Cloudflare Workers AI | 充足 |
| 数据库 | Upstash Redis | 每天 1 万次命令 |
| 前端 | Next.js on Vercel | 充足 |
| 域名 (路由) | zerodrop-sandbox.online | 89 卢比/年 |
| 域名 (品牌) | zerodrop.dev | 1500 卢比/年 |
Total spend to launch: ₹1,589 (~$19) 启动总支出:1589 卢比(约 19 美元)
That’s it. No servers, no VMs, no managed databases with minimum monthly fees. The entire thing scales to zero when nobody is using it. 就是这样。没有服务器,没有虚拟机,也没有设有最低月费的托管数据库。当无人使用时,整个系统会缩减至零。
The architecture in plain English
通俗易懂的架构说明
An email arrives at anything@zerodrop-sandbox.online. Cloudflare intercepts it at the MX level and triggers a Worker function. The Worker runs a Llama 3 classification — if it’s spam, it gets dropped silently. If it’s legitimate, it gets parsed into clean JSON and pushed to Upstash Redis with a 30-minute TTL. The Next.js dashboard polls every 3 seconds and displays it instantly. The whole thing processes an email in under 500ms from arrival to display. 一封邮件发送到 anything@zerodrop-sandbox.online。Cloudflare 在 MX 级别拦截它并触发一个 Worker 函数。Worker 运行 Llama 3 分类——如果是垃圾邮件,则静默丢弃。如果是合法邮件,它会被解析为整洁的 JSON 并推送到 Upstash Redis,设置 30 分钟的生存时间 (TTL)。Next.js 仪表板每 3 秒轮询一次并立即显示。整个过程从邮件到达至显示在页面上,耗时不到 500 毫秒。
The two-domain decision
关于双域名的决策
The routing domain (zerodrop-sandbox.online) and the brand domain (zerodrop.dev) are intentionally separate. Disposable email domains get blocklisted. When that happens — and it will — you replace the routing domain for ₹89 and update one DNS record. The brand domain, the dashboard, the npm package, the users’ bookmarks — none of it is affected. This was a $10 architectural decision that prevents a future crisis. 路由域名 (zerodrop-sandbox.online) 和品牌域名 (zerodrop.dev) 是刻意分开的。临时邮箱域名很容易被列入黑名单。当这种情况发生时(迟早会发生),你只需花 89 卢比更换路由域名并更新一条 DNS 记录即可。品牌域名、仪表板、npm 包、用户的书签——都不会受到影响。这是一个价值 10 美元的架构决策,可以预防未来的危机。
The numbers after launch
发布后的数据
These are real, unmanipulated numbers from the first week with zero paid promotion: 以下是发布第一周内,在零付费推广情况下的真实、未经修饰的数据:
-
338 npm installs of zerodrop-client — organic, from search
-
1 confirmed organic user — visible in Upstash usage data. Someone found the site, generated an inbox, received a real email, and read it. Before any marketing.
-
6,300+ Redis commands in the first 72 hours — and climbing
-
$0.00 infrastructure cost
-
₹1,589 total spend including domains
-
338 次 zerodrop-client 的 npm 安装——来自搜索的自然流量
-
1 位确认的自然用户——在 Upstash 使用数据中可见。有人找到了该网站,生成了收件箱,收到了一封真实邮件并阅读了它。这发生在任何营销活动之前。
-
前 72 小时内超过 6,300 次 Redis 命令调用——且在持续增长
-
0.00 美元的基础设施成本
-
1589 卢比的总支出(包含域名费用)
The 338 npm installs before any promotion is the signal that matters. Developers are actively searching for this solution and finding it through keyword discovery alone. 在没有任何推广的情况下获得 338 次 npm 安装,这是一个重要的信号。开发者们正在积极寻找这种解决方案,并且仅通过关键词搜索就能找到它。
What’s coming next
未来计划
The free tier works. The next milestone is the Workspace tier — custom domain routing, team seats, API keys, webhook support for CI pipelines. The pricing is $49/month per workspace. The waitlist is open at zerodrop.dev. When 25-30 signups come from company email addresses, that’s when the Workspace tier gets built. Until then the free tier runs itself. 免费层级已经跑通。下一个里程碑是工作区 (Workspace) 层级——支持自定义域名路由、团队席位、API 密钥、CI 流水线的 Webhook 支持。定价为每个工作区每月 49 美元。候补名单已在 zerodrop.dev 开放。当有 25-30 个来自公司邮箱的注册时,我就会开始构建工作区层级。在此之前,免费层级将自动运行。
The honest assessment
诚恳的评估
This is not a finished product. It’s a free tier with a waitlist and a hypothesis: that QA teams at companies will pay $49/month for custom domain email testing infrastructure embedded in their CI pipelines. The hypothesis is unproven. The free tier is real, the organic usage is real, and the npm downloads are real. Everything else is still a bet. If you’re building something similar or have feedback on the architecture — I’m at the @zerodropdev handle on X. 这不是一个成品。它只是一个带有候补名单的免费服务,以及一个假设:即公司的 QA 团队愿意每月支付 49 美元,来使用嵌入其 CI 流水线的自定义域名邮件测试基础设施。这个假设尚未得到验证。免费层级是真实的,自然流量是真实的,npm 下载量也是真实的。除此之外的一切仍是一场赌注。如果你也在构建类似的东西,或者对架构有任何反馈,可以在 X 上通过 @zerodropdev 找到我。
The SDK
SDK 使用示例
npm install zerodrop-client
import { ZeroDrop } from 'zerodrop-client';
const mail = new ZeroDrop();
const inbox = mail.generateInbox();
const email = await mail.waitForLatest(inbox, { timeout: 10000 });