smtp.dev

Guides

CI Email Assertions

Send from the test suite, poll the API, assert on subject and body, then expire or delete the message fixture.

Poll for a message

Use a unique subject or plus-address tag per run. The mailbox message list supports q= search across subject, sender, recipient, and text body.

curl -H "X-API-KEY: $SMTPDEV_API_KEY" \
  "https://stmp.ink/api/accounts/1/mailboxes/1/messages?q=checkout-42"

Cleanup

Set expires_at on messages created by CI or run flask cleanup-expired from the app environment on a schedule.

FLASK_APP=run_web.py flask cleanup-expired