Build steadier Playwright email checks with real MX routing
A receive-only test inbox can replace fixed sleeps with bounded message polling, but inbox quotas and the 180-second ceiling still shape the suite.
A repeatable visual check can catch broken email formatting while keeping active content out of the QA preview.
Email layout bugs often survive tests that only check whether a message arrived. A subject assertion cannot tell you that a heading wraps badly, a call to action is pushed below the fold, or a two-column section has become hard to read. A visual check helps catch those defects, but opening arbitrary email HTML in an unrestricted browser can expose the reviewer to active content.
A sandboxed email preview gives QA a useful middle ground: inspect the delivered message’s appearance while blocking scripts, forms, popups, and remote images. InboxRhino provides receive-only MX test inboxes at test.inboxrhino.in and a sandboxed viewer for opening received HTML. Here is a practical workflow for using that kind of safe email console during QA.
Do not begin by asking whether the email “looks right.” Pick a testable concern: does the verification heading fit on a narrow screen, is the button still visible after the greeting, or does the footer remain readable when the message is long? A focused question makes the preview useful and helps separate a real defect from a subjective design preference.
Use a test environment that sends the same template and representative content as the flow you care about. Include realistic values such as a long customer name or a lengthy one-time code if those values could affect wrapping. Keep the message itself free of real customer information.
Send the email to a test inbox, then wait for it to arrive instead of sleeping for a fixed interval. InboxRhino’s API supports wait-for-message polling for up to 180 seconds, with filtering by subject and sender. Those filters help a test select the intended message when a flow produces more than one email.
InboxRhino’s documentation includes API and Playwright examples. Use those as a starting point for wiring the message wait into your existing test; keep the visual review separate from the delivery assertion. The API check answers whether the expected message arrived. Opening the received HTML answers whether its rendered content is legible.
For teams building out the environment around these checks, staging email checks in ephemeral Docker environments covers isolating test mail and waiting for delivery in CI.
Open the actual received email in the sandboxed viewer, rather than relying only on the source template or a screenshot captured before delivery. Check the hierarchy first: can a reader identify the sender, purpose, main instruction, and next step? Then inspect the details that commonly break: line wrapping, spacing between sections, alignment, text contrast, and whether important content remains visible without excessive scrolling.
Compare what you see with the specific question you chose. If the button appears too low, check whether a long greeting or an unexpected line break pushed it down. If a heading wraps awkwardly, test the template with shorter copy and then with realistic longer content. This narrows the cause to the markup, styles, or content rather than prompting a broad redesign based on one screenshot.
The viewer blocks scripts, forms, popups, and remote images. That is a useful security boundary for inspecting email HTML, but it changes what the preview can show. A missing remote image is not, by itself, evidence that the template’s layout is broken. Check the text and spacing around the image, and test image delivery separately in an appropriate controlled environment. Likewise, a sandboxed preview cannot prove that a link works or that a form submits.
Record the message scenario, the layout issue, and the expected result. For example: “With a long account name, the verification instruction remains readable and the primary action remains visible.” Keep the automated assertion focused on measurable facts, such as receipt of the expected message or presence of expected content. Use the visual review to catch presentation problems that those assertions do not describe.
When a defect is found, change one relevant part of the template and send another test message. Repeating the same scenario makes it easier to see whether the fix helped. Avoid treating one inbox preview as proof that every mail client will render the message identically; it is a practical QA check, not a substitute for testing the clients and conditions your users depend on.
A safe email console is for receiving and inspecting test messages, not for completing the user journey. InboxRhino inboxes are receive-only: they cannot send, reply to, or forward mail. The viewer’s sandbox also means it should not be used to validate interactive behavior. Test the delivered content visually, check delivery through the API, and verify links or other actions through separate, controlled test steps.
InboxRhino retains email for 30 days before deletion, so avoid treating the test inbox as a permanent archive. A small, repeatable cycle—send representative content, wait for the matching email, inspect its rendered layout, and log the result—gives QA a way to debug HTML email formatting without turning a preview into an unrestricted execution environment.
A receive-only test inbox can replace fixed sleeps with bounded message polling, but inbox quotas and the 180-second ceiling still shape the suite.
Use k6 to load the reset flow, then verify a bounded sample through InboxRhino without turning inbox quotas into a second load test.
A useful test inbox API comparison starts with delivery waits, quotas, retention and preview safety—then checks Tigrmail’s current terms directly.