Registration Workflows: How Developers Can Test With Temp Mail
Registration Workflows: How Developers Can Test With Temp Mail
Use a temporary inbox by hand for the few registration checks that need real internet mail, and a local mail catcher for everything automated. MTempMail's API is off, so it can't be built into a pipeline today.
This post used to describe an integration with our API. Below is something that stays useful: what to test in a registration flow, and with which inbox.
The email cases worth testing
| Case | What should happen | Where to test |
|---|---|---|
| New address | One mail, quickly, with the right language and name | Temporary inbox, by hand |
| Link opened on another device | Works, or explains why not | Temporary inbox, scan its QR code with a phone |
| Link opened twice | Friendly message, no error page | Mail catcher |
| Code expired | Clear text and a resend button | Mail catcher with a changed clock |
| Resend pressed five times | Limit, and only the newest code valid | Mail catcher |
| Address already registered | No hint to strangers that the account exists; the owner gets a mail | Mail catcher |
| Capital letters, plus tag, long domain, spaces | Accepted or cleaned correctly | Unit test plus mail catcher |
| Email changed after sign-up | New address confirms, old one is informed | Two temporary inboxes |
| Mail server down | Sign-up isn't lost, mail is queued | Mail catcher with errors. Mailpit has a Chaos feature for it |
| Link scanners | A security tool that opens links first must not use up the token | A button on the landing page instead of a GET that confirms |
The last one is easy to miss. Corporate filters fetch links. If a simple GET confirms the account, the filter has confirmed it before the user.
A manual run in ten minutes
- Open MTempMail twice: once in a normal window and once in a private one. You now have two addresses.
- Register on staging with the first. Note how many seconds the mail takes.
- Check sender name, subject, preview line, logo, the link's domain, and the plain-text part.
- Follow the link. Then follow it again.
- Change the account's email to the second address. Both inboxes should receive something.
- Request a password reset, and look whether the old link still works after a new one was sent.
- Delete the account. Is there a last mail?
Use invented data. The inbox has no password, so don't send real customer names or production links there. For the mail's technical side, paste the test address from the email spam test into your form once.
Automate the rest
Run a mail catcher next to your app in CI. Our Postman post has the commands and scripts, and Mailpit also has a package for Cypress. For tests against an outside domain, use a service with an API, or a catch-all subdomain of your own: every [email protected] ends in one mailbox that your tests can read with IMAP. That needs no third party and no disposable domain.
Should your form refuse disposable addresses?
Developers ask this from the other side, so here is a view from a service that gets refused.
- Reasons to refuse: free resources with a cost, votes, reviews, regulated products.
- Reasons not to: you lose honest people who dislike marketing mail, and lists are never complete. The public disposable-email-domains list is a common source, and like any such list it can contain mistakes.
- A middle way: accept the address, limit costly features until a payment method or phone is added, and show a line such as "you need this address to recover the account".
- If you refuse, say so. An error like "please use a permanent email" is kinder than a mail that never comes. How blocking works.
Never treat a verified email as proof of identity. It shows that someone could open an inbox at that minute.
Common questions
Can I use temp mail for load tests?
No. Use a catcher. Thousands of messages to a public service look like abuse and will hurt your sender reputation.
Which status should an unverified account have?
Let it exist with limits and delete it after a set period, so that a mistyped address doesn't block its real owner.
Tags:
Related guides
- Temp Mail for Developers: Testing Sign-Up and OTP Flows
- Monitor a Temp Mail Inbox With a Bot: What Works Today
- Why Developers and Privacy-Lovers Are Turning to MTEMPMAIL.com for Temporary Emails
- CapCut Code Not Arriving on Temp Mail: Causes and the Safe Fix
- Temp Mail for Kick: The 60-Day Email Lock and Other Limits