Test inboxes for end-to-end tests and agents

Create a throwaway inbox, run the sign-up or password-reset flow you are testing, wait for the email and pull the link out of it. No signup and no API key needed.

Acceptable use

Test flows you own. Use these inboxes for sign-up, password-reset, magic-link and notification flows of apps you build, operate or are authorised to test.

Do not point the API or the MCP server at services you do not own or operate to create or verify accounts automatically or in bulk, or to get around another service's sign-up limits or bans. Our Terms of Service prohibit ban evasion and commercial bulk operations without our written permission (section 4), and we may suspend access that breaks them, including revoking API keys (section 14).

Playwright quick start

Create an inbox over the REST API, run your sign-up flow, wait for the message and follow the link in it.

import { test, expect } from '@playwright/test'; const API = 'https://stopmailing.net/api'; test('sign-up sends a confirmation link', async ({ page, request }) => { // 1. Create an inbox. No key needed. const created = await request.post(API + '/emails', { data: {} }); expect(created.ok()).toBeTruthy(); const { email } = await created.json(); const inbox = API + '/emails/' + encodeURIComponent(email.address); // 2. Run the sign-up flow of the app you are testing. await page.goto('https://your-app.example/signup'); await page.getByLabel('Email').fill(email.address); await page.getByRole('button', { name: 'Sign up' }).click(); // 3. Wait for the message (poll every 2 seconds, up to 60 seconds). let messages: { id: string }[] = []; await expect .poll(async () => { const res = await request.get(inbox + '/messages'); messages = (await res.json()).messages ?? []; return messages.length; }, { timeout: 60_000, intervals: [2_000] }) .toBeGreaterThan(0); // 4. Read it and follow the first link. const res = await request.get(inbox + '/messages/' + messages[0].id); const message = await res.json(); const link = message.body.match(/https?:\/\/\S+/)?.[0]; expect(link).toBeDefined(); await page.goto(link!); // 5. Clean up. The inbox also expires on its own. await request.delete(inbox); });

Cypress quick start

The same flow with cy.request.

const API = 'https://stopmailing.net/api'; function waitForMessage(inbox, attempts = 30) { return cy.request(inbox + '/messages').then(({ body }) => { const messages = body.messages ?? []; if (messages.length > 0) return messages[0]; if (attempts <= 1) throw new Error('No message arrived'); cy.wait(2000); return waitForMessage(inbox, attempts - 1); }); } describe('sign-up', () => { it('sends a confirmation link', () => { // 1. Create an inbox. No key needed. cy.request('POST', API + '/emails', {}).then(({ body }) => { const address = body.email.address; const inbox = API + '/emails/' + encodeURIComponent(address); // 2. Run the sign-up flow of the app you are testing. cy.visit('https://your-app.example/signup'); cy.get('input[type=email]').type(address); cy.contains('button', 'Sign up').click(); // 3. Wait for the message, 4. read it and follow the first link. waitForMessage(inbox) .then((m) => cy.request(inbox + '/messages/' + m.id)) .then(({ body: message }) => { cy.visit(message.body.match(/https?:\/\/\S+/)[0]); // 5. Clean up. The inbox also expires on its own. cy.request('DELETE', inbox); }); }); }); });

MCP server for AI agents (coming soon)

A Model Context Protocol server will let an agent create an inbox, wait for a message, read it and delete the inbox. It is not published yet; the client configuration will appear on this page when it is.

It receives mail only: it has no tool to send, forward or compose email. It collects no telemetry and writes nothing to disk.

Tools

  • create_inbox(ttl_minutes?, domain?): Creates an inbox and returns its address and expiry. The service caps the lifetime.
  • wait_for_message(address, from?, subject_contains?, timeout_s): Returns the first matching message with its text, HTML and links, or a timeout result after at most 120 seconds. Messages that arrived before the call count.
  • list_messages(address, limit?): Lists the messages in an inbox, newest first.
  • read_message(address, message_id, format): Reads one message as text, HTML or raw source.
  • delete_inbox(address): Deletes the inbox and its messages. Inboxes you forget are deleted when they expire.

Configuration

  • STOPMAILING_API_KEY: Optional API key, sent as X-API-Key. Without it, anonymous limits apply.
  • STOPMAILING_API_URL: Optional API base URL. Defaults to https://stopmailing.net/api.

Limits

  • An inbox lasts 10 minutes by default. You can extend it to up to 60 minutes from when it was created; each extension sets the expiry to now plus the minutes you ask for.
  • Requests made with an API key are rate-limited per key. Over the limit, the API returns 429 Too Many Requests; wait and retry later.
  • The MCP server waits at most 120 seconds for a message per call.
curl -X PATCH https://stopmailing.net/api/emails/:address \ -H 'Content-Type: application/json' \ -d '{"extension_minutes": 30}'

Privacy and retention

  • Anyone who knows an inbox address can read the mail sent to it. Use test data, not real personal data.
  • Messages are deleted when the inbox expires, and the inbox itself about 5 minutes later. Backup copies are erased within a few days after that. Deleting the inbox yourself removes it and its messages sooner.
  • You do not need an account. Server logs, including IP addresses, are kept for up to 90 days for security, abuse prevention and service performance. See our Privacy Policy.
  • Every request from the MCP server carries an X-Client: mcp/<version> header. We count requests by client type in aggregate; the header identifies the software, not you.
  • This page loads no analytics or third-party scripts and sets no tracking cookies. We count visits in aggregate from our own access logs and keep only the totals.