Mailisk for Playwright

Test email + SMS workflows with Playwright

From email notifications to SMS alerts, promotional offers to authentication flows

Mailisk lets you build end-to-end tests for your email and SMS workflows, effortlessly.

  • Typed Node library
  • Built-in polling
  • Email & SMS support in one API

Integration example

Assert email or SMS responses

Use the official SDK inside Playwright tests to await the exact email or SMS you expect after triggering a flow.

import { test, expect } from "@playwright/test";
import { MailiskClient } from "mailisk";

const namespace = "pw-ci";
const mailisk = new MailiskClient({ apiKey: process.env.MAILISK_API_KEY });

test("reads the reset email", async ({ page }) => {
  const testEmail = `user@${namespace}.mailisk.net`;

  await page.goto("/forgot-password");
  await page.getByLabel("Work email").fill(testEmail);
  await page.getByRole("button", { name: /send reset/i }).click();

  const { data } = await mailisk.searchInbox(namespace, {
    to_addr_prefix: testEmail,
    subject_includes: "Reset password",
  });

  expect(data.length).toBeGreaterThan(0);
  const email = data[0];
  const m = email.text?.match(/https:\/\/example\.com\/\S+/);
  const resetLink = m?.[0];
  await page.goto(resetLink ?? "/");
});

Add Mailisk to Playwright in minutes

Avoid brittle mocks. Hit the same verification emails your customers receive and assert their content with real data.

Step 1

Install the official Mailisk library

npm install mailisk and store your API key as MAILISK_API_KEY inside the Playwright config.

Step 2

Create a new namespace in the dashboard

Create a new namespace in the dashboard for use in tests.

Step 3

Assert emails & SMS

Call mailisk.searchInbox or mailisk.searchSms from within your tests and assert HTML, text, or links.

Why QA teams pair Mailisk with Playwright

First-class TypeScript support

MailiskClient ships with typed responses that plug directly into Playwright test code.

Easy to use

The library has been designed to be easy to use and understand.

Instant API visibility

Debug payloads directly from the dashboard or API client. Inspect headers, attachments, or OTP payloads instantly.

Test real attachments

Easily automate attachment testing. Every email response includes attachment metadata.

SMS testing included

Capture inbound SMS to validate MFA and passwordless logins alongside your email checks.

Secure EU hosting

Every message lives on GDPR-compliant infrastructure with configurable retention windows.

Use cases we power

Account & MFA verification

Generate OTP codes, parse verification links, and assert locale-specific templates from within Cypress.

Transactional notifications

Cover receipts, shipping updates, and billing alerts by checking headers, attachments, and SMS mirror messages.

Billing & receipts

Assert that payment confirmations display correct amounts and metadata by parsing structured payloads.

Preview emails in dashboard

Preview emails directly in the dashboard without sending them to yourself. Debug issues easily, see metadata and attachments.

Bring Mailisk to your Playwright CI

Catch regressions around email and SMS before they slip into production.