End-to-End Email Testing Made Simple
Testing email flows is historically one of the hardest parts of end-to-end testing. QA engineers and developers often resort to complex workarounds like intercepting SMTP traffic, running local mail servers, or maintaining fragile test accounts on providers like Gmail that frequently trigger anti-bot protections.
Test-Emails.com offers a robust solution: instantly provisioned, disposable mailboxes designed specifically for automated testing.
Why Use a Disposable Inbox API?
- Isolation: Each test suite run gets a fresh, clean inbox. No cross-contamination of test data.
- Speed: Inboxes are created instantly, and emails are routed and delivered in milliseconds.
- Automation-First: Build for CI/CD pipelines. No captchas, no rate limits on standard usage, and predictable JSON responses.
Integrating with Playwright & Cypress
Our REST API is easily consumable directly from your E2E test scripts. You don't need any SDKs—just standard HTTP fetch calls.
// Example Playwright Test snippet
test('User can sign up and verify email', async ({ page, request }) => {
// 1. Create a fresh test inbox
const inboxRes = await request.post('https://test-emails.com/hcgi/api/mailbox');
const { address, token } = await inboxRes.json();
// 2. Sign up on your staging site
await page.goto('https://staging.myapp.com/signup');
await page.fill('input[name="email"]', address);
await page.click('button[type="submit"]');
// 3. Poll for the verification email
const messagesRes = await request.get('https://test-emails.com/hcgi/api/mailbox/messages', {
headers: { 'x-mail-token': token }
});
const { messages } = await messagesRes.json();
// 4. Extract OTP and complete signup
const otp = messages[0].text.match(/Code: (\d{6})/)[1];
await page.fill('input[name="otp"]', otp);
});