@mailwurf/e2e
v0.3.0
Published
Fetch client for the Mailwurf wait API
Readme
@mailwurf/e2e
fetch client for the tenant-scoped Mailwurf API at /v1. No Playwright dependency. The app keeps its real mail sender; tests only set the recipient.
Public on npm.
npm install @mailwurf/e2eimport { createMailwurf } from "@mailwurf/e2e";
const mailwurf = createMailwurf(process.env.MAILWURF_API_KEY!); // API key (mw_live_…) from Dashboard → API keys
const inbox = await mailwurf.createInbox();
await page.fill("[name=email]", inbox.address);
await page.click("text=Sign up");
const mail = await inbox.waitFor({ subject: "Confirm", timeout: 15_000 });
await page.goto(mail.links[0]!);
// mail.otp → "482193"The first argument is the organization key (mw_live_…) and is required; createMailwurf() throws when it is empty. The package reads no environment variables. It talks to https://api.mailwurf.io; pass apiUrl only for a self-hosted Mailwurf. A bare host is treated as https://:
createMailwurf("mw_live_…", { apiUrl: "mailwurf.example.com" });subject is a case-insensitive substring. timeout is milliseconds.
