Email is the test surface nobody wants to own. It's asynchronous, depends on external providers, has its own version of "flaky" (sometimes a delivery just… takes 90 seconds), and the bugs that bite hardest in production — wrong template variables, broken unsubscribe links, OTPs that expire too fast — are the ones unit tests can't catch.

This guide is the working developer's playbook for testing email in 2026. We'll cover the three layers (unit, integration, end-to-end), the tooling for each, and the patterns that actually scale.

The Three Layers of Email Testing

| Layer | What you're testing | Tooling | |---|---|---| | Unit | Template rendering, variable substitution, plain-text fallback | Jest / Vitest with snapshot tests | | Integration | Your app correctly calls your email provider's API | Provider sandbox or mock SDK | | End-to-end | The email actually arrives and the user can complete the flow | YoBox Temp Mail + Cypress / Playwright |

Most teams cover unit. Many cover integration. Few cover end-to-end — and that's exactly where the production bugs live.