What gets in the way?
- Email steps are the flakiest part of end-to-end tests: fixed sleeps, polling loops and regular expressions that break when a template changes.
- Shared mailboxes mix codes between parallel workers.
- Older suites read a test mailbox over IMAP or POP3, and replacing the mail server means rewriting every helper.
- Browser agents stall at sign-up walls, two-factor prompts and magic links because they have no address of their own.
How does nofeb handle it?
An inbox per run
Inboxes are unlimited on paid plans and can expire on their own with ttl_seconds, emitting inbox.expired. Plus-addressing gives extra addresses on one inbox when that is simpler.
Wait, do not poll
wait_for_email long-polls for up to a minute per call, filtered by sender, subject or has_otp; the SDKs chain polls for longer waits. Pass since so a fast email is not missed.
Codes and links as fields
Every message carries otps (with whether each came from the subject or body) and links classified as verify, magic_login, password_reset, unsubscribe or other.
Keep the IMAP helpers
A suite that already logs in to a mailbox keeps working: point it at nofeb's IMAP or POP3 host over TLS, with the inbox address as the username and an app password created for that inbox. GET /v1/inboxes/{inbox_id}/mail-client-settings returns the hosts and ports.
Real delivery
Inboxes are real addresses, so the production sending path and third-party identity providers are tested as they are. Mail between nofeb inboxes is delivered internally, so a test can also play both sides.
What does the code look like?
import { Nofeb } from "@nofeb/sdk";
const nf = new Nofeb(); // reads NOFEB_API_KEY
const inbox = await nf.inboxes.create({ local_part: "signup-bot", ttl_seconds: 3600 });
const since = new Date(); // before the form is submitted
// … type inbox.address into the sign-up form …
const { message } = await nf.inboxes.waitForEmail(inbox.id, { has_otp: true, timeout: 60, since });
const code = message?.otps[0]?.code; // "482913" from datetime import datetime, timezone
from nofeb import Nofeb
nf = Nofeb() # reads NOFEB_API_KEY
inbox = nf.inboxes.create(local_part="signup-bot", ttl_seconds=3600)
since = datetime.now(timezone.utc) # before the form is submitted
# … type inbox["address"] into the sign-up form …
result = nf.inboxes.wait_for_email(inbox["id"], has_otp=True, timeout=60, since=since)
code = result["message"]["otps"][0]["code"] # "482913" curl -X POST https://api.nofeb.com/v1/inboxes/$INBOX_ID/app-passwords \
-H "authorization: Bearer $NOFEB_API_KEY" -H 'content-type: application/json' \
-d '{"name": "ci imap helper"}'
# Log in over IMAP (993) or POP3 (995) as the inbox address with the returned password. Where does nofeb stop?
- nofeb receives mail at real addresses; it is not a sandbox that captures everything a staging system sends to arbitrary recipients, and it has no SMS or device previews. Not offered
- It does not solve CAPTCHAs or phone verification for browser agents.
Frequently asked questions
How do I test an email OTP in Playwright?
Create an inbox, fill its address into the form, then await waitForEmail with has_otp and since, and type message.otps[0].code. The Playwright guide has a complete test.
How do I test email verification in Cypress?
Run nofeb calls as Cypress tasks in Node: one creates the inbox, one waits for the code. The spec calls cy.task and types the result.
Can my existing IMAP test helper read nofeb inboxes?
Yes. Create an app password for the inbox and log in over IMAP with implicit TLS or STARTTLS, or over POP3; logins are accepted only over TLS.
Do I need a mail server to test sign-up emails?
No. The inbox is hosted and reachable from the internet, so your application sends through its normal provider and the test reads what arrived.
How does a browser agent get past email verification?
Give the session its own inbox, have the agent type the address, then call wait_for_email with has_otp (as a tool over MCP or through the SDK) and enter the code or open the magic link.
Status of everything on this page
Every capability named above, with its status as reconciled against the engine.
| Capability | What it does | Status |
|---|---|---|
| Disposable inboxes with a time to live | Give an inbox a lifetime in seconds; it and its mail are removed when it expires, and an event says so. | Shipped |
| Unlimited inboxes | Create as many inboxes as the work needs, with a generated or chosen address and an idempotent client reference. | Shipped |
| Plus-addressing | Mail to name+tag@ reaches the name@ inbox. | Shipped |
| Wait for an email | Long-poll an inbox for up to a minute until a message matching sender, subject or has-a-code arrives. | Shipped |
| One-time code and link extraction | Verification codes and classified links are pulled out of every message and returned as fields. | Shipped |
| Delivery between inboxes | Mail between inboxes on the platform is delivered internally, for agent-to-agent workflows and test environments. | Shipped |
| IMAP and POP3 | IMAP4rev2 (with IMAP4rev1 compatibility, IDLE, CONDSTORE and QRESYNC) and POP3 on every inbox, over TLS only, signed in with the inbox address and an API key or a revocable per-inbox app password. | Shipped |
| TypeScript and Python SDKs | Official clients generated from the OpenAPI document: @nofeb/sdk for Node, Deno, Bun and edge runtimes, and nofeb for Python with sync and asyncio clients. Both chain long polls for waitForEmail, retry idempotent requests, page through lists and verify webhook signatures. | Shipped |
| MCP server | A remote MCP server over streamable HTTP whose tools are generated from the same operation table as the REST API and dispatched through the same router, so a tool cannot behave differently from its endpoint. | Shipped |