·v0.4.0
feature
Templates: react-email components for transactional sends
EmailMate 0.4.0 ships a first-class templates system for transactional email.
What’s new
- New
emailmate/templatessub-export with pre-built components (Button, Container, Hr, Link, Section, Text) built on top of@react-email/components. - A tailored Tailwind preset (
emailmate/templates/tailwind-preset) so your agent-authored templates match the EmailMate visual language out of the box. - Zod variable schemas: declare your template inputs once, get validated rendering AND JSON-schema for MCP tool calls.
- Template registry: named templates you can invoke by ID (
em_send_template { template_id: "welcome", variables: {...} }).
Why
Agents were writing raw HTML. Agents should not be writing raw HTML.
Now they invoke em_template_render with a named template and typed variables, and get back an inlined, litmus-tested email body. Dashboard shows a preview.
Upgrade
bun add emailmate@0.4.0
No breaking changes. Old em_send { html } calls continue to work.