Skip to main content

Guide

A Developer Testing Toolkit for Email Flows and Debugging

By Farhan BashirUpdated

Email flows are some of the most fragile parts of an app: the signup confirmation that lands in spam, the reset link that expires too soon, the magic link that works once in staging and never in production. They are also awkward to test, because every test needs a real mailbox.

This guide covers how to test those flows with disposable inboxes, and how to debug what the emails contain using browser-based tools that keep tokens and payloads on your machine.

Why email flows break in testing

Teams usually start by testing against their own addresses, plus-tags on a shared mailbox, or invented addresses. Each causes problems: messages pile up in someone's real inbox, plus-tags are rejected by some validators, and invented addresses bounce, which counts against the sending domain's reputation.

Disposable email for QA covers the testing patterns, and why QA scripts shouldn't use real email addresses explains the reputation damage in detail.

Testing a signup and a password reset by hand

For exploratory and manual testing, a temporary inbox for QA testing gives you a fresh address in one click, with no account. Messages appear in the list as they arrive, and the inbox expires on its own (after 30 minutes by default) or when you dispose of it.

Know its limits before relying on it: tempboxs drops attachments, removes images from the HTML, does not keep the raw header block, and cannot send mail. What happens to an email sent to tempboxs explains each of those choices.

  1. Open a temporary inbox and copy the address.
  2. Sign up in the app under test with that address.
  3. Confirm the verification email arrives, the sender and subject are right, and the link or code works once and only once.
  4. Request a password reset for the same account. Check the link expires when it should and cannot be replayed after use.
  5. Change the inbox name to get a new address and repeat with a second account, or dispose of the inbox when you are done.

Automated tests need inboxes by API

End-to-end tests need to create an inbox, trigger the email, wait for it and read it back without a browser. That requires an API. tempboxs does not offer a public API yet; the developer waitlist for private test inboxes describes what is planned.

Whatever service you use, keep test traffic on a separate sending domain or subdomain from customer mail, so a burst of test bounces cannot hurt production deliverability.

Debugging what the email gives you

Once the message arrives, most of the work is inspecting what is inside it. These tools run in your browser, so codes, tokens and payloads are not uploaded anywhere.

  • Extract the code or link: prototype the pattern in the regex tester, for example code:\s*(\d{6}) for a six-digit code, before putting it in your test.
  • Inspect a magic-link or reset token: if it is a JWT, the JWT decoder shows its claims, including exp as a date. Decoding does not verify the signature.
  • Read encoded values: the Base64 converter decodes standard Base64 to UTF-8 text.
  • Read the webhook or API payload your app sent: the JSON formatter validates and pretty-prints it.
  • Check expiry times: the Unix timestamp converter turns epoch seconds or milliseconds into UTC and local time.
  • Seed unique test users: the UUID generator creates up to 50 random v4 UUIDs at once.
  • Verify a build artifact or download: the hash generator computes SHA-256, SHA-384 and SHA-512 for files without uploading them.

Check the sender before go-live

Before an email flow ships, confirm the sending domain is authenticated. Look up its SPF, DKIM and DMARC records with the DNS lookup tool, then send a test to a mailbox whose headers you can read (Gmail or Outlook) and paste them into the email header analyzer. The email security and deliverability guide has a ten-minute checklist.

Test-data hygiene

  • Never paste production secrets, signing keys or customers' tokens into any website, including browser-based tools; use test tokens.
  • Use separate sending domains or subdomains for test traffic.
  • Make test accounts obviously fake (a UUID in the name) so they are easy to find and delete.
  • Don't send test mail to colleagues' real inboxes; it trains their spam filters against your domain.

Frequently asked questions

Only if the service offers an API to create inboxes and read messages. tempboxs works for manual testing today; programmatic test inboxes are on the developer waitlist.

Open a temporary inbox, create a test account with its address, request a reset, and check that the link arrives, works once, and expires when it should. Use a new inbox for each account so tests don't interfere.

The tempboxs JWT, JSON, Base64, regex, hash and timestamp tools process input in your browser and don't upload it. Even so, use test tokens rather than production ones in any tool.

Not yet. Developers who need private test inboxes by API can join the waitlist on the developers page.