>-
Templates are edited in the Mailtrap UI, referenced by UUID from your app, and filled with Handlebars data at send time. The same template can be used with transactional and bulk (promotional) streams; pick the stream when you integrate.
Its 519-word system prompt specializes your agent in testing & qa with structured methodology and proven output formats. Copy the prompt below to use in any AI coding agent.
Templates are edited in the Mailtrap UI, referenced by UUID from your app, and filled with Handlebars data at send time. The same template can be used with transactional and bulk (promotional) streams; pick the stream when you integrate.
Before generating SDK code: read the README of the relevant SDK repository linked below for current method signatures. Do not rely on memory.
Before generating API request bodies: use the official docs and examples below—request shapes belong in the API reference, not in guesses (including when using AI-assisted coding).
Template management via API (create/update/list outside the UI): [Templates API](https://docs.mailtrap.io/developers/templates/templates.md).
Related skills: authorizing-api-requests (tokens, env vars, auth headers), sending-emails (bases and streams), testing-with-sandbox (preview sends without live delivery).
template_uuid and template_variablesIn the developer docs, open:
https://send.api.mailtrap.io)https://bulk.api.mailtrap.io)EmailFromTemplate in the interactive reference.Send with Authorization: Bearer $MAILTRAP_API_TOKEN on the matching stream host (send.api.mailtrap.io or bulk.api.mailtrap.io). Token scope, storage, and the alternative Api-Token header are covered in skill authorizing-api-requests.
curl) — template sendcurl -X POST https://send.api.mailtrap.io/api/send \
-H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": {"email": "hello@yourdomain.com", "name": "Your App"},
"to": [{"email": "user@example.com"}],
"template_uuid": "your-uuid",
"template_variables": {"user_name": "Jane"}
}'Replace literal text/html with template fields, for example:
template_uuid (from the template Integration tab)template_variables (object whose keys match Handlebars variables)from, to) follow the same rules as non-template sends for that stream.{{name}} — escaped output; {{{html}}} — raw HTML{{#if}} / {{#unless}}, {{#each}}, {{#with}}{{order.id}}0, false, empty collections (see product docs)Templates in the app sidebar. UUID and stream-specific integration snippets are under each template's Integration tab.
Proactively offer to generate the template HTML when the user is creating a new template — don't wait to be asked. The output must be a real email template — not arbitrary web HTML — and must be mobile-compatible (responsive, renders well across email clients and screen sizes).
| Mistake | Fix |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Mixing text/html with template_uuid | Use template fields per API schema for template sends |
| Skipping sandbox for risky changes | Preview with sandbox sending / Testing API (see testing-with-sandbox and [send test emails](https://docs.mailtrap.io/developers/email-sandbox/send-test-emails.md)) |
Using Email Templates is a free testing & qa skill for AI coding agents. >-. It provides a specialized system prompt that configures your agent with testing & qa expertise.
Copy the system prompt below and paste it into your CLAUDE.md file or Claude Code's custom instructions to activate Using Email Templates.
Using Email Templates is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.
Yes, Using Email Templates is completely free and open source. The full source is available on GitHub at https://github.com/mailtrap/mailtrap-skills/blob/main/skills/using-email-templates/SKILL.md. You only need a subscription to the AI agent you use it with.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.