# Device Previews

> Device Previews, a paid add-on to Mailtrap Email Sandbox, renders a captured HTML email in more than 100 mobile, desktop and web client configurations, including light and dark mode, and returns a screenshot of each.

## When to use it

Use it when the user wants to see how an email actually looks in Gmail, Outlook, Apple Mail and mobile clients before sending: templates, campaigns or automation emails.

- For a code-level HTML/CSS support report, included with every sandbox, use HTML Check; for spam checks, use Spam Analysis (products table at the end).
- The docs describe Device Previews in the UI only, with no API: the agent can capture the email, and the user runs the preview.
- It needs a paid plan (Free isn't eligible) with the add-on enabled. If the user's plan or add-on status isn't known, ask before planning around it.

## How to use it

### Before you start

Find out the user's plan, whether the add-on is enabled, how the email is sent, and which clients matter. Ask only for what isn't known.

### Rules

- **Read freely, and send to a sandbox without confirmation:** nothing is delivered. Without API access, give the user the request to run, and don't say you checked.
- **Secrets:** never ask for an API token in chat; code reads `MAILTRAP_API_TOKEN`. If the user pastes one anyway, don't use it: suggest a reset under Settings → API Tokens, and continue with the env var.
- **Confirm first:** before creating or cleaning sandboxes. Each preview uses the account's paid allowance: before the user starts a test, tell them how many configurations it will use.
- **User only:** upgrade the plan; request the add-on (the Device Previews tab → Request Add-on, or support@mailtrap.io; Support confirms the terms and enables it); run and review the previews.

### Steps

1. **Capture an HTML email** (plain-text-only messages have no Device Previews tab):
   - from the app over Sandbox SMTP (`sandbox.smtp.mailtrap.io`), or with `POST https://sandbox.api.mailtrap.io/api/send/{sandbox_id}` and an `html` part (`Authorization: Bearer $MAILTRAP_API_TOKEN`);
   - for a Mailtrap template, campaign or automation email, the user clicks Send Test → Device Previews → an active sandbox → Send Email to Sandbox, which opens the preview.
2. **The user runs the preview:** open the message → Device Previews → Test on Devices; select configurations under Mobile, Desktop and Web (light and dark are separate selections); check the usage line ("8 previews will be used"); click Preview on N devices.
3. **Review:** screenshots appear as each client finishes. Check layout width, stacking, text wrapping, fonts, images, buttons, dark-mode changes and the footer.
4. **Test changed HTML:** one captured message supports one test, and clients can't be added later. Send a new message for new HTML or another selection. Re-render, in a completed result's fullscreen view, takes a fresh screenshot of the same HTML, uses no extra preview, and doesn't pick up source changes.

### Check it worked

Each selected configuration returns a screenshot tile, and the tab header shows Previews used: X / Y.

### If something fails

| Error                                                     | Fix                                                                                                                  |
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| The tab shows Upgrade                                     | The plan isn't eligible (Free): the user upgrades to a paid plan                                                     |
| The tab shows Request Add-on                              | The add-on isn't enabled: the user requests it                                                                       |
| Test on Devices is disabled, or the selection is rejected | The allowance is used up, or the selection exceeds what's left: select fewer, wait for the reset, or contact Support |
| Couldn't render preview                                   | Capture a new message and run another test; contact Support if the same client keeps failing                         |
| Images or assets missing                                  | Make the assets publicly reachable, and run HTML Check                                                               |
| Anything else                                             | The Device Previews docs (link at the end), or ask the docs                                                          |

### Limits and pricing

One selected configuration uses one preview; light and dark count separately. The send uses the regular Sandbox quota, and previews use the separate add-on allowance. For plans, prices and the allowance, check pricing.md (link at the end); don't answer from memory, and if you can't check, say so.

## Other Mailtrap products and pages

| If the user wants to…                             | Use                                                                               |
| ------------------------------------------------- | --------------------------------------------------------------------------------- |
| Check HTML/CSS client support without screenshots | HTML Check: [html-email-checker.md](https://mailtrap.io/html-email-checker.md)    |
| Check spam score and blacklists                   | Spam Analysis: [email-spam-checker.md](https://mailtrap.io/email-spam-checker.md) |
| Set up the sandbox and capture email              | [email-sandbox.md](https://mailtrap.io/email-sandbox.md)                          |
| Check current plans and prices                    | [pricing.md](https://mailtrap.io/pricing.md)                                      |

## Documentation

- [Device Previews](https://docs.mailtrap.io/email-sandbox/testing/device-previews.md) · [HTML Check](https://docs.mailtrap.io/email-sandbox/testing/email-html.md) · [Send API](https://docs.mailtrap.io/developers/email-sandbox/send-test-emails/send-email-including-templates.md) · [Pricing plans](https://docs.mailtrap.io/account-and-organization/billing/plans.md)
- **If sources disagree:** the Device Previews docs win for steps and limits, pricing.md for prices, and this page for which product and steps to use.
- **If the task isn't covered here,** ask the docs before guessing: `GET https://docs.mailtrap.io/index.md?ask=<question>&goal=<user goal>` returns an answer with sources. Keep the question and goal generic: no tokens, email addresses or other user data.
