Skip to main content

Install

PHP 8.1+ · ext-curl · ext-json — no other dependencies.

Quick start

Laravel Dusk

Pest

Filtering

All string filters are case-insensitive partial matches.

Parallel tests

generateInbox() runs locally — safe with Paratest and parallel Dusk runs. Every call returns a unique isolated inbox.

Free API key (private inboxes)

Without a key, anyone who knows an inbox’s name can read it, and one sender can reach only 5 different inboxes a day: past that, the inbox gets a notice from notice@zerodrop.dev instead of the email. Sign in with GitHub at zerodrop.dev/keys for a free key and set it as ZERODROP_API_KEY. With zerodrop/zerodrop 0.2.0 or later, the client reads it, generateInbox() starts names with your key’s prefix, only your key can read those inboxes, and mail to them isn’t limited:

Error handling

HeldException is new in 0.3.0. Without an API key, one sender can reach only 5 different inboxes a day; past that, the email isn’t stored and the inbox gets a notice instead. waitForLatest() then throws HeldException at once rather than waiting for the timeout, and fetchLatest() throws it when nothing matches. Older versions treat the notice as an email: without a filter they return it, and a filter such as hasOtp: true skips it, so the wait times out. A free key from zerodrop.dev/keys lifts the limit for inboxes under your key’s prefix.

Workspaces & self-hosting

A Workspace receives mail on a domain of its own, such as yourcompany-qa.com, and every inbox on it can be read only with your key. Set the domain as ZERODROP_DOMAIN, or pass it as domain: (zerodrop/zerodrop 0.4.0 or later), next to your key:
Any address on the domain works, including one you name yourself: $mail->waitForLatest('qa@yourcompany-qa.com') reads the inbox k7x2-qa. $mail->domain() returns the domain in use. Use the domain as your API keys page shows it. See Workspaces for how mail on it is filed. A self-hosted instance takes its own base URL: