Skip to main content
v0.2 March 15, 2025

Email Templates

Design reusable, dynamic email templates with variable substitution and preview support. Ship consistent transactional emails without touching code every time.

Email Templates

What it does

The mailkube template engine lets you define email layouts once and reuse them across your entire application. Define your structure, brand, and content blocks in a single place — then pass dynamic variables at send time.

No more assembling HTML strings in your application code. No more copy-pasted email layouts drifting out of sync. Templates live in mailkube, versioned and preview-ready.

Key benefits

  • Variable substitution — Pass dynamic data at send time: names, links, amounts, order IDs. Any field in your template can be a variable.
  • Live preview — See exactly how your email renders before a single message is sent. Test with real variable values.
  • Version history — Every template change is versioned. Roll back to a previous version safely without redeploying your application.
  • Multi-locale ready — One template per locale, sharing the same variable contract. Ship a French version alongside your English one without duplicating logic.

Getting started

  1. Create a template in your dashboard or via the API
  2. Give it a unique slug (e.g. order-shipped)
  3. Reference it by slug when sending — pass your variables in the data object
  4. Preview before you ship

See the API Reference for the full template object schema and the data payload format.