| name | inline-and-test |
| description | Compile, preview, and test HTML email templates regardless of framework — browser preview, test sends, cross-client testing, spam/deliverability checks. Use after authoring a template with Foundation, Maizzle, or MJML. |
Compile, Preview, and Test Emails
Framework-agnostic guidance for going from source template → tested, ready-to-send HTML.
1. Compile
| Framework | Dev command | Production command | Output |
|---|
| Foundation | npm start | npm run build | dist/*.html |
| Maizzle | npm run dev | npm run build | build_production/*.html |
| MJML | mjml src.mjml -o out.html | mjml src.mjml -o out.html --config.minify=true | out.html |
Always ship the production compile — dev builds skip inlining and minification.
2. Browser preview (fast, low fidelity)
All three frameworks serve a BrowserSync-style preview in dev mode. Useful for:
- Layout review
- Copy review
- Spot-checking responsive breakpoints
Not useful for: actual email client rendering. A browser is nothing like Outlook.
3. Send a test to yourself (essential)
Via Resend (if available)
If the user has the Resend MCP connected:
Use the send-email tool with the compiled HTML as the body, sending from a verified Resend domain to a test address.
Via Gmail compose
Quickest sanity check:
- Open
build/final.html in browser.
- Select all, copy (rendered, not source).
- Paste into a new Gmail compose.
- Send to yourself.
Catches 80% of obvious issues.
Via SMTP / ESP API
For repeated testing, script it:
curl -X POST 'https://api.resend.com/emails' \
-H 'Authorization: Bearer <RESEND_KEY>' \
-H 'Content-Type: application/json' \
-d "{
\"from\": \"test@yourdomain.com\",
\"to\": \"you@example.com\",
\"subject\": \"Template test\",
\"html\": $(jq -Rs . < build/final.html)
}"
4. Cross-client testing
For any email going to more than a handful of recipients:
- Litmus (litmus.com) — renders in 100+ clients, paid.
- Email on Acid (emailonacid.com) — similar, paid.
- Mailtrap (mailtrap.io) — free tier, inbox + spam scoring.
- Manual multi-account: send to Gmail, Outlook.com, iCloud, Yahoo, a real Outlook desktop install if you have one.
Priority targets (in order of how much they break things):
- Outlook desktop (Word-rendered) — most fragile
- Gmail mobile app — strips some CSS
- iOS Mail dark mode — auto-inversion surprises
- Gmail web with images off — alt-text layout test
5. Spam and deliverability
Before sending at volume:
6. Preview tools
- MJML online editor (mjml.io/try-it-live): live preview for MJML.
- Parcel / Sauce (inboxpreview.com, similar): drop in HTML, see rendered previews across clients without a full Litmus subscription.
hey-email / htmlemail.io: quick test-send services.
Pre-ship checklist
Shipping to an ESP
Most ESPs accept pasted HTML:
- Open production-compiled HTML in a text editor.
- Copy all.
- Paste into the ESP's "code your own" / "import HTML" flow.
- Send a final test through the ESP — link tracking rewrites can change layout.
- Schedule / send.