Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Test HTML emails in Cypress by capturing the message outside the mailbox UI, retrieving it through a Cypress task or test-inbox API, and asserting on its headers, text, HTML, and links. Use a local SMTP capture server when your test app can send to one; use an API-accessible test inbox when mail goes through an external provider or cannot be redirected. To test rendered interactions, load the captured HTML into the Cypress browser—but treat that as a check of your template, not proof that every email client renders it identically.
Choose how Cypress will receive the email
Cypress advises against signing into a mailbox website to check messages. Its FAQ calls that an anti-pattern and recommends using a third-party API or talking directly to your server instead: Cypress Documentation FAQ.
| Approach | Use it when | How it works | Trade-off |
|---|---|---|---|
| Local SMTP capture | Your application can route test mail to a temporary SMTP server. | Capture messages in the test process, expose them through Cypress tasks, and inspect the returned message in a spec. | Local and controllable, but you manage the SMTP server, message storage, and asynchronous handoff. |
| Hosted test inbox and API | The app sends through a third-party email service or cannot be redirected to local SMTP. | Send to a test address, find the matching message through the provider API, and assert on its properties and bodies. | Requires a service account and API credentials, and adds an external dependency. |
| Temporary email provider or plugin | You want disposable addresses and an integration tailored to a provider. | Use the provider or community plugin to create or access test inboxes. | Check data handling, maintenance, provider reliability, and compatibility with your Cypress version. Cypress labels entries in its plugin directory as community extensions: Cypress plugin directory. |
Keep Cypress in charge of the end-to-end workflow, but retrieve email through a task, server-side capture, or testing-service API. Do not assume delivery is instantaneous: wait for the matching message rather than relying on a fixed delay.
Capture email with a local SMTP server
A local capture server is useful when the application can use test SMTP settings. Cypress’s tutorial demonstrates running a temporary SMTP server in the plugin process, storing the plain-text and HTML bodies by recipient, and exposing retrieval and reset tasks. Its example uses older Cypress plugin conventions, so adapt the architecture to your project’s current Cypress configuration rather than copying legacy file paths verbatim. See the Cypress HTML email tutorial.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Register capture and retrieval tasks
The key pieces are a server that accepts the application’s test email, a message store keyed by a unique recipient, and Cypress tasks that let specs reset and retrieve stored messages. The following is the task-side shape; connect captureServer and emails to the SMTP capture implementation used by your project:
// cypress.config.js (adapt to your current Cypress configuration)
const { defineConfig } = require('cypress');
const emails = new Map();
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// Start your temporary SMTP capture server here.
// When mail arrives, store the complete message:
// emails.set(recipient, { from, to, subject, body, html });
on('task', {
resetEmails() {
emails.clear();
return null;
},
getLastEmail(recipient) {
return emails.get(recipient) || null;
}
});
return config;
}
}
});
The SMTP library and its message-parsing interface vary; Cypress’s tutorial illustrates the capture-server approach, rather than prescribing a universal SMTP package. Configure the application’s test mail transport to target that server, and store both body and html if your product sends multipart mail.
Retrieve the right message and assert on it
Use a new recipient for each test where possible, and clear stored mail before triggering the action. This prevents a test from accidentally passing against an older email:
it('sends a confirmation email with a working link', () => {
const recipient = `cypress-${Date.now()}@example.test`;
cy.task('resetEmails');
cy.visit('/register');
cy.get('[name=email]').type(recipient);
cy.get('form').submit();
cy.task('getLastEmail', recipient).then((email) => {
expect(email, 'captured email').to.exist;
expect(email.to).to.include(recipient);
expect(email.subject).to.contain('Confirm');
expect(email.body).to.contain('confirmation');
expect(email.html).to.contain('href=');
});
});
The capture task must return a serializable value Cypress can pass back to the spec. Adapt property names to the SMTP parser you use, and assert only the headers and content your application promises.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Render the HTML and check a link
When you need to verify visible content or an interaction, place the captured HTML in the test document and exercise the link. The Cypress tutorial demonstrates this pattern, including checking the resulting application path:
cy.task('getLastEmail', recipient).then((email) => {
expect(email).to.exist;
cy.document().then((document) => {
document.body.innerHTML = email.html;
});
cy.contains('a', 'Confirm your email')
.should('be.visible')
.and('have.attr', 'href')
.then((href) => {
expect(href).to.include('/confirm');
});
cy.contains('a', 'Confirm your email').click();
cy.location('pathname').should('include', '/confirm');
});
For links that leave the application or contain one-time tokens, inspect the href or extract the token and visit a controlled route rather than navigating to an uncontrolled external destination.
Use an API-accessible test inbox
A hosted inbox is a practical fit when mail delivery runs through an external email provider or local SMTP redirection is not available. Mailosaur documents a Cypress workflow in which a test triggers an email, sends it to a Mailosaur test address, searches for the message, and asserts on its properties and HTML body. Its search can match recipient, sender, subject, or body, and its server ID provides a test domain with wildcard addresses. Read the Mailosaur Cypress email testing guide.
Install and configure the integration
Mailosaur’s quickstart documents the cypress-mailosaur package, importing its commands from Cypress support setup, and configuring an API key. Check its current package and Cypress-version compatibility before adopting it. The vendor also documents using CYPRESS_MAILOSAUR_API_KEY rather than committing a key to source control: Mailosaur Cypress quickstart.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
npm install --save-dev cypress-mailosaur
Follow the quickstart’s current support-file import and environment setup. Keep the key in your CI secret store or local environment, not in a checked-in configuration file.
Search for the message and assert
The documented helper cy.mailosaurGetMessage() waits for a message and supports matching criteria such as recipient, sender, subject, or body. A test can then inspect the returned headers, text, and HTML. The precise search options and response field names should follow the vendor’s current guide:
cy.mailosaurGetMessage(serverId, {
sentTo: recipient,
subject: 'Confirm your email'
}).then((email) => {
expect(email.to[0].email).to.equal(recipient);
expect(email.subject).to.contain('Confirm');
expect(email.text.body).to.contain('confirmation');
expect(email.html.body).to.contain('href=');
});
Use a unique address per test when possible. If a fixed test address is necessary, make the search criteria specific enough to distinguish the message generated by the current test from old or unrelated messages.
What to assert in an email test
Match assertions to the behavior your application is responsible for. A message arriving is only one part of the contract.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
- Routing and metadata: recipient, sender address, sender display name, and subject where those values matter.
- Plain text: required copy, verification code, or fallback content when the application sends a text alternative.
- HTML: visible wording, key CTA, required markup, and expected link destination.
- Workflow: whether the extracted link or token leads to the intended route or state.
- Timing: whether the message appears within a reasonable test timeout, without depending on an arbitrary sleep.
Test both text and HTML when your product sends both. Source assertions are effective for exact content and attributes; loading HTML into the browser helps verify DOM visibility and interactions.
Rendering checks are not cross-client email tests
Cypress renders captured HTML in its browser environment. That can catch broken template markup, missing content, and link behavior, but it does not establish that Gmail, Outlook, Apple Mail, or other clients will display the message identically. Email clients can apply their own rendering behavior. For appearance-sensitive templates, add checks suited to your supported clients, relevant viewport sizes, accessibility, and visual comparison. The Cypress tutorial also points to accessibility, multiple viewports, and visual testing as extensions to the basic email assertions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Reliability, performance, and cost considerations
Wait for arrival without hiding failures
Email delivery is asynchronous. A local task that immediately looks up a message may run before the capture server receives it; Cypress’s tutorial explicitly notes that its simple example assumes receipt by the time the task is called. If that is flaky, retry retrieval until the message is available or a reasonable test timeout expires. A hosted inbox helper that waits for arrival can handle this handoff, but still use specific search criteria so the test cannot match stale mail.
Isolate each test
- Use unique recipients or reset captured state before each test.
- Keep message stores scoped to the test run and avoid shared mutable inbox state across parallel workers.
- Assert the intended recipient and other identifying fields before checking content.
- Set an explicit, bounded wait for delivery; a timeout should fail with enough context to diagnose missing or misrouted mail.
Choose a cost and dependency profile deliberately
Local SMTP capture avoids a hosted inbox account for the capture step, but requires maintaining the test server and integration. A hosted API reduces local server setup and can fit real third-party delivery paths, but brings service credentials, external availability, and any applicable service charges into the test environment. No general delivery-time or cost figure applies across providers; check the terms and limits for the service and plan you select.
Recommended Free Tools
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Troubleshooting common failures
| Symptom | Likely cause | Fix |
|---|---|---|
| No message is returned by a local task | The app is not pointed at the capture server, the server has not received the message yet, or the task uses a different recipient key. | Verify test SMTP host and port, log the captured recipient, and retry task retrieval until a bounded timeout. |
| A test passes using an old email | The inbox or in-memory store contains messages from a prior run. | Reset before triggering the workflow and prefer a unique recipient per test. |
| The hosted inbox search returns no match | Search criteria do not match the actual recipient or subject, or delivery has not completed. | Check the generated address and message metadata; use the provider’s waiting search helper and a specific but correct query. |
| The HTML assertion fails although the email arrived | The parser may expose HTML under a different field, or the template differs from the assumed markup. | Inspect the returned message shape, assert on user-visible copy where possible, and use the provider or parser’s documented field names. |
| A rendered email link does not reach the expected route | The href may be absolute, tokenized, redirected, or external to the test origin. | Assert the href separately, then visit a controlled route or extract the token rather than assuming a relative path. |
| Works locally, fails in CI | Missing API secrets, parallel tests sharing inbox state, slower delivery, or incompatible package/configuration conventions. | Supply credentials through CI secrets, isolate recipients by worker, allow a bounded delivery wait, and verify current Cypress and integration compatibility. |
Or skip the browser setup
If your goal is to capture a clean webpage screenshot as part of a test or workflow, ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. It is not an email inbox or an email-client rendering test; use it for webpage screenshots, not as a replacement for capturing generated email.
Example request: ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes supported cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server includes screenshot tools for AI agents. The free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for free.
Frequently Asked Questions
Does Cypress itself send or receive email?
Cypress coordinates the test; email capture or retrieval is provided by a local SMTP server, your application’s server, or a test-inbox API.
Does loading email HTML into Cypress prove it will look right in Outlook or Gmail?
No. It checks the template in Cypress’s browser, not the rendering behavior of each email client.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

