Drive the external product
Fill forms, trigger the message, enter the code, and assert the resulting UI state through the browser automation framework.
Keep web interaction in the browser and mailbox retrieval in a scoped tool, then join them through a code or confirmation link.
Browser automation needs an external inbox when the tested site sends a code, magic link, invitation, or confirmation email. mails0 gives the automation a dedicated address and a separate retrieval tool, so the browser does not need to open a human webmail account or share broad OAuth credentials.
The browser and the inbox should be separate tools
Fill forms, trigger the message, enter the code, and assert the resulting UI state through the browser automation framework.
Use a scoped CLI, API, SDK, or MCP tool to wait for the message instead of logging into a personal webmail page.
Track the recipient and trigger time so the automation can prove which message belongs to which browser session.
Fill forms, trigger the message, enter the code, and assert the resulting UI state through the browser automation framework.
Use a scoped CLI, API, SDK, or MCP tool to wait for the message instead of logging into a personal webmail page.
Track the recipient and trigger time so the automation can prove which message belongs to which browser session.
Acquire the address and credential first so the browser task does not block on identity setup mid-form.
Complete the form and capture the pending or confirmation state before checking mail.
Use the mailbox tool with a deadline and expected recipient rather than scraping another browser tab.
Confirm sender context and restrict confirmation links to expected HTTPS hosts before navigating.
Enter the code or open the link, then assert the verified application state and clean up test state.
mails code --to "$TEST_EMAIL" --timeout 60An email can direct a browser to any URL. A test or autonomous agent that follows links without validation can leave the intended site, expose session state, or execute an attacker-controlled workflow.
Treat the inbox result as data. Parse the link, require HTTPS, compare the hostname with the expected service, and preserve a human approval step when the action affects a real account or external system.
| Pattern | Mailbox result | Browser assertion |
|---|---|---|
| Numeric OTP | Extract current code. | Code is accepted and verification state appears. |
| Magic link | Retrieve and validate expected-host URL. | Navigation establishes only the intended session. |
| Invitation | Read organization, inviter, and link. | Correct account joins the intended tenant. |
| Password reset | Retrieve single-use reset link. | Password changes and old link no longer works. |
| Approval email | Extract approved or rejected state. | Browser reflects the same workflow outcome. |
Keep the trigger timestamp, recipient, selected message ID, extracted value, navigation target, and final application state together in the test result. This makes a failed run diagnosable without preserving sensitive mailbox content or relying on a screenshot alone.
Product behavior is verified against the mails0 source and documentation. External comparisons link to official vendor documentation checked on 2026-08-15.
Playwright controls browsers, not mailboxes. Pair it with an email API, SDK, CLI, or MCP tool so the test can retrieve the message outside the browser.
A human Gmail session exposes unrelated mail and adds fragile UI automation. A scoped test inbox is smaller, safer, and easier to reset.
Parse the URL, require HTTPS, verify the expected hostname and path, then navigate in an isolated browser context. Do not follow arbitrary inbound links.
Yes. The hosted provisional mailbox is designed for receive-only first-run workflows such as codes and confirmation links.
Start with a receive-only temporary mailbox. Move to a permanent identity or self-hosted deployment only after the workflow reaches a real email value event.