Using Temp Mail for Development and QA Testing

How developers can use disposable inboxes to test sign-up, verification and password-reset emails, and how to self-host for CI.

By the TempMailify Editorial TeamUpdated November 12, 20263 min read
Quick answerReal inboxes catch real problems. Use temp addresses for manual QA, and self-host Tempmailify's open code to get a JSON API for automated tests.

What to test

  • Welcome and verification emails
  • Password reset and magic-link flows
  • Receipts and notifications
  • Plain-text alternatives
  • Image-blocked rendering

Manual QA workflow

  1. Create a custom address named after your test case.
  2. Trigger the flow in your app.
  3. Check both rich and plain views.
  4. Use the detected link or code to continue.

Automated testing via the API

When self-hosted, Tempmailify exposes a small JSON API: create an inbox with POST /api/inbox, list messages with GET /api/inbox/{address}, and read one with GET /api/inbox/{address}/messages/{id}, each authorised with the inbox token.

Tips

Use a dedicated domain for tests so production reputation isn't affected, and clean up test inboxes at the end of each run.

A test plan for transactional email

EmailWhat to check
Sign-up confirmationArrives within seconds, link works once and expires, correct product name
Verification codeCode in subject or first line, expiry time stated, resend works
Password resetLink expires, old link stops working after use, no account enumeration
Receipt or invoiceTotals, tax, currency and address formatting
Notification digestUnsubscribe link and List-Unsubscribe header present

Checking authentication and headers

Every message in a temporary inbox shows the SPF, DKIM and DMARC results added by our receiving server. Use them to confirm that your production sending setup is correct before real users see it. Open the raw source to check headers such as Message-ID, List-Unsubscribe and List-Unsubscribe-Post, and make sure your From domain aligns with the domain that signs the message.

Example: create an inbox and wait for a code

curl -s -X POST https://tempmailify.com/api/inbox -H "content-type: application/json" -d '{}'
# returns {"address":"...","token":"...","expiresAt":...}
curl -s https://tempmailify.com/api/inbox/ADDRESS -H "authorization: Bearer TOKEN"

Poll the list endpoint with the since value from the previous response to get an instant "unchanged" reply when there is nothing new. Each message includes a detected verification code when one is found, which keeps test scripts short. See the API page for all endpoints.

Good habits

  • Create a fresh address per test run so results never mix.
  • Never send real customer data to a temporary inbox.
  • Keep test traffic modest. The API is rate limited to protect the service for everyone.
  • Delete the inbox at the end of the run instead of waiting for it to expire.

Checking List-Unsubscribe and bulk sender rules

If your app sends marketing or digest emails to Gmail or Yahoo users in large volumes, they must include a List-Unsubscribe header with an HTTPS URL and a List-Unsubscribe-Post header with the value List-Unsubscribe=One-Click. Open the raw source of a test message in the temporary inbox and confirm both are there, and that a POST to the URL actually unsubscribes the address.

Debugging a message that never arrives

  1. Check your sending service's logs for the message and its delivery status.
  2. If it shows a bounce, look up the code in the SMTP error reference.
  3. If it shows delivered but nothing appears, confirm the address in your test matches the inbox exactly, including the domain.
  4. Check message size; very large messages are refused at the door.
  5. Send a plain test from your own mail account to the same inbox to rule out the inbox side.

Your checklist

  • Use a fresh inbox per test run.
  • Assert on subject, links and codes.
  • Check SPF, DKIM and DMARC results.
  • Delete inboxes at the end of the run.

Terms used on this page

List-Unsubscribe
An email header that lets mail apps show a one-click unsubscribe button.
SPF
Sender Policy Framework, a DNS record listing which servers may send mail for a domain, helping receivers detect spoofing.
DKIM
DomainKeys Identified Mail, a cryptographic signature added to emails so receivers can verify they weren't altered and came from the domain.
DMARC
A policy that tells receivers what to do with mail failing SPF or DKIM checks, and where to send reports.
Message-ID
A unique identifier assigned to every email, used to thread replies and detect duplicates.
Bounce
A message returned to the sender because it couldn't be delivered.
SMTP
Simple Mail Transfer Protocol, the standard protocol servers use to send and relay email across the internet.

Related guides

FAQ

Is there an API key?

No key is needed. Each inbox returns its own token, which you use for that inbox only.

Can I use the API in CI pipelines?

Yes, for moderate test volumes. Keep runs within the rate limits.

Does the inbox show raw headers?

Yes. Open a message to see headers and authentication results.

Is there a webhook for new mail?

The web app uses a live connection; for scripts, poll the list endpoint with the since value.

Try it free

A private disposable inbox with an Email X-ray for every message.

Get a temp email

Install TempMailify

Add TempMailify to your device for one-tap access, like a regular app.