Replacing Mailinator in your CI tests: private inboxes, no signup

2026-11-11来源 dev.to WebDevEnglish

Mailinator is great for eyeballing one email. In automated tests it has two problems: the free inboxes are public, and API access needs a paid plan or approval. If your test reads a verification code from a public inbox, anyone who guesses the address can read it, or land on the same inbox as your test.

What I use instead is receivemail.dev: one request creates a random address plus a secret, and only the secret can read the mail. No signup, no key.

import { test, expect } from "playwright-receivemail"; test("new user verifies their email", async ({ page, mailbox }) => { await page.goto("/signup"); await page.getByLabel("Email").fill(mailbox.address); await page.getByRole("button", { name: "Create account" }).click(); const code = await mailbox.waitForMatch(/\b\d{6}\b/); await page.getByLabel("Verification code").fill(code); }); 

Tradeoffs: messages live 60 minutes on the free tier, there is no custom domain, and it's email only. Side-by-side with Mailinator, Mailosaur and others: https://receivemail.dev/compare/mailinator-alternative

I built it, so weigh that accordingly.

原文:https://www.a8q9.cn/en/article/replacing-mailinator-in-your-ci-tests-private-inboxes-no-signup-2ee9c0.html

相关文章