On September 17, 2026, we updated Mailsac’s email previews to isolate email HTML from the surrounding application. This was an intentional change to improve Mailsac’s security. If your automated tests inspect email content through the Mailsac website, you may need to update how they locate that content.
What changed
- Expanded HTML messages in the standard inbox now render inside a sandboxed iframe.
- The full HTML preview at
/dirty/{inbox}/{id}now also uses a sandboxed iframe. - Unified Inbox already used an iframe; its preview now has additional sandbox restrictions.
The sandbox blocks scripts inside emails and prevents the surrounding page from directly accessing the email’s document. This keeps email content separate from the Mailsac application.
Updating browser tests
Use your test framework’s iframe support to locate elements inside the email preview. A selector that searches only the top-level page will no longer find content inside the frame.
The current preview iframe titles are:
- Standard inbox:
Email message - Full HTML preview:
Email HTML preview - Unified Inbox:
Email message body
Select the relevant preview frame, then apply your existing email-content locators within it. If several messages are expanded, scope the frame selector to the message you are testing or keep only that message expanded.
For framework-specific guidance, see Playwright’s frame locators or Selenium’s frame switching. Direct access through the parent page’s contentDocument is intentionally restricted by the sandbox.
Tests that retrieve email content through the API do not need iframe selectors; the frame-selection steps above apply to browser UI tests.
Communication and support
We should have communicated this compatibility change when it shipped. We’re sorry for the extra investigation this caused.
If you need help adapting a test, contact Mailsac support with the view you use and your automation framework.