← ClaudeAtlas

mailpit-testinglisted

Use for any question or task about testing email your code sends, including one password-reset or signup email and broken links in sent mail: capture messages in Mailpit's local SMTP server (port 1025), assert on subject, body and links through its REST API, test SMTP failures with chaos mode, multipart, unsubscribe and bounce flows, or migrate from MailHog.
testland/qa-skills · ★ 0 · Testing & QA · score 72
Install: claude install-skill testland/qa-skills
# mailpit-testing ## Overview Mailpit is an SMTP server for tests: it captures every message the app sends, shows it in a web UI and exposes it through a REST API, and its Chaos feature returns configurable SMTP errors for resilience tests ([docs][mp-docs]). It never delivers mail. ## When to use - The app sends transactional email (password reset, sign-in links, notifications) and tests must assert on what was sent. - Retry and dead-letter code needs real SMTP errors (Chaos, Step 5). - The full flow needs coverage beyond capture (headers, multipart, links, unsubscribe, bounces): [references/email-flows.md](references/email-flows.md). - An existing MailHog setup is being replaced: [references/migrating-to-mailpit.md](references/migrating-to-mailpit.md). ## Step 1 - Run it ```bash docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit:v1.32 # or: brew install mailpit && mailpit ``` SMTP listens on 1025 and the web UI / API on 8025 ([repository][mp-gh]). Pin an image tag; the API changes between releases. Prefer the image or a release binary over the repository's install script, which pipes remote code into a root shell. **Check it is up before any test:** ```bash curl -fsS http://localhost:8025/api/v1/info # 200 with version and message count ``` ## Step 2 - Point the app at it | Stack | Setting | |---|---| | Django | `EMAIL_HOST=localhost`, `EMAIL_PORT=1025` | | Spring | `spring.mail.host=localhost`, `spring.mail.port=1025` | | Rails | `sm