Skip to content

Disposable inboxes for testing sign-up and password-reset emails

Create a fresh, real inbox for every test run, wait for the email your app sends, and read the code or link from it. Works from a script, from CI, or driven by an AI agent.

The problem with testing email flows

Sign-up confirmation, password reset, magic links and welcome emails are easy to break and hard to test. Shared test mailboxes mix up results between runs, and a mocked mail server never proves the email really arrives.

A new real address per test

Each test creates its own inbox with create_inbox (or the REST API), so results never collide. Use ttl_minutes to have throwaway inboxes delete themselves. Plus-addressing sends variations such as name+test1@ to the same inbox.

Wait, then assert

wait_for_message returns as soon as a matching message arrives (or times out), with verification codes and links already extracted. Your test then checks the subject, the sender, the links and the attachments.

REST
# 1. a fresh inbox
curl -X POST "https://mailforbots.com/api/v1/inboxes" \
  -H "Authorization: Bearer $BOTMAIL_KEY" -H "Content-Type: application/json" \
  -d '{ "ttl_minutes": 30 }'

# 2. sign up to your app with the returned address, then read what arrived
# 3. assert on the code or link, then let the inbox expire

Run it in CI or let an agent do it

The same account works over REST, over MCP for AI-driven testing, and with webhooks if you would rather be called when mail arrives. See the quickstart.

The Free plan includes 3 inboxes; Pro raises that to 100 and allows your own domain. See pricing.

Start free