poofbox
v0.1.0
Published
Disposable inboxes for tests and AI agents: create an address, wait for the verification email, get the code or link. Client for Poofbox Mail (poofboxmail.com).
Maintainers
Readme
poofbox
Disposable inboxes for end-to-end tests, CI and AI agents. Create an address, sign up with it, and get the verification code or magic link back in one call. No IMAP, no polling loops, no shared Gmail accounts.
npm install --save-dev poofboximport { Poofbox } from 'poofbox';
const pb = new Poofbox(); // reads POOFBOX_TOKEN
const inbox = await pb.createInbox();
// …fill your sign-up form with inbox.address…
const email = await inbox.waitForEmail({ subject: 'verify' });
console.log(email.code); // "482913"
console.log(email.link); // "https://app.example.com/verify?token=…"
await inbox.delete();Playwright
import { test, expect } from '@playwright/test';
import { Poofbox } from 'poofbox';
const pb = new Poofbox();
test('sign up and verify the email', async ({ page }) => {
const inbox = await pb.createInbox();
await page.goto('/signup');
await page.getByLabel('Email').fill(inbox.address);
await page.getByRole('button', { name: 'Create account' }).click();
const { code } = await inbox.waitForEmail({ subject: 'code', timeout: 60_000 });
await page.getByLabel('Verification code').fill(code!);
await expect(page.getByText('Welcome')).toBeVisible();
await inbox.delete();
});Setup
- Get Poofbox at poofboxmail.com (Personal or Pro).
- In the dashboard, open MCP access → New token and copy the
pbm_…token. - Set it as
POOFBOX_TOKENin your environment or CI secrets.
Use an MCP token (pbm_…), never your license key: the license key only logs in to the dashboard, and an MCP token can be revoked on its own.
API
new Poofbox({ token?, baseUrl?, fetch? }):tokendefaults toPOOFBOX_TOKEN;baseUrltoPOOFBOX_URLorhttps://poofboxmail.com(point it at a self-hosted Poofbox).pb.createInbox({ domain? })→Inbox(id,address). Passdomain: 'poofy.uk'for an address on the permanent domain.inbox.waitForEmail({ timeout?, from?, subject?, after? })→Email. Long-polls, so it returns as soon as the email lands; throwsPoofboxTimeoutErroraftertimeoutms (default 60 000). Mail that arrived after the inbox was created counts, even if it landed before you started waiting.Email:code(best one-time code),codes,link(best verify/magic/reset link),links,subject,from,to,text,attachments(signed download URLs).inbox.emails(),inbox.delete(),pb.listInboxes(),pb.readEmail(id, { html }),pb.account().waitForEmail(address, { token?, subject?, … }): one-liner for an existing inbox.pb.call(tool, args): any Poofbox MCP tool.
Inboxes are receive-only. Plan limits (active inboxes, new inboxes and emails per day) apply; see pricing. Use it for your own sign-ups and tests, as described in the acceptable use policy.
AI agents can use the same inboxes directly through the MCP server at https://poofboxmail.com/mcp.
MIT © BLANKET BYTE
