# Testing email flows in CI/CD with temporary email APIs

Humanless covers the three common email flows in a pipeline with one pattern: create an inbox, trigger the email, wait, act. For signup and login codes, `waitForCode` returns the OTP. For confirmation, magic-link and password-reset emails, `waitForLink` returns the URL. The wait is a long-poll, so there's no polling interval to tune. Pass `since`, a timestamp taken just before "Send reset link", so the earlier signup email is excluded; without `since`, each message is handed out once. When choosing between temporary email APIs, compare parsing (do you write the regex?), waiting (polling or push), parallel isolation, data retention and price per run. Pay-as-you-go accounts can create 30 identities per hour (Starter 100, Team 300, Scale 1,000), so for larger suites reuse an identity across a spec or save the login state.

```ts reset-password.spec.ts
const since = Date.now();
await page.getByRole("button", { name: "Send reset link" }).click();
const { url } = await hl.waitForLink({ identityId: inbox.identity_id, since, timeout: 25 });
await page.goto(url);
await page.getByLabel("New password").fill("a-new-long-password");
await page.getByRole("button", { name: "Save" }).click();
```

## Other options

- **Mailosaur and MailSlurp**: established hosted APIs, including sending, long-lived inboxes and SDKs in several languages.
- **Mail.tm**: free public API, best for experiments.
- **Mailpit**: free and self-hosted; it tests your SMTP output rather than your provider's delivery.

> **Use policy:** Only for apps you own or are authorized to test. See the [Terms](/terms).

More: [Humanless vs Mailosaur vs MailSlurp vs Mailtrap](/compare/mailosaur-alternative) · [All answers](/answers/)

Last updated 2026-12-04

Canonical: https://usehumanless.com/answers/testing-email-flows-in-ci-cd-with-temporary-email-apis

---
More: https://usehumanless.com/llms.txt
