Skip to content

Dynamic email templates

Reusable email templates with Handlebars variables and React Email. Preview, version, and send updates without redeploying your app.

Handlebars variables

Use {{name}}, {{company}}, or any custom variable. Conditional blocks and loops render personalised content for every recipient.

React Email support

Build templates as React components with full TypeScript support. Compile to responsive, accessible HTML with the React Email library.

Version history and rollback

Every template edit is versioned. Compare revisions, preview any past version, and roll back in a single click if something ships wrong.

Send with a template

typescript
await poststack.emails.send({
  from: 'hello@yourdomain.com',
  to: 'user@example.com',
  subject: 'Welcome, {{name}}!',
  templateId: 'tmpl_welcome_v2',
  variables: {
    name: 'Alice',
    company: 'Acme Inc',
    loginUrl: 'https://app.acme.com/login',
  },
});

Use cases

Reusable transactional content

Welcome emails, password resets, receipts, and order confirmations all live as named templates. Edit copy or styling once and every future send picks up the change — no redeploy required.

Designer / developer split

Designers edit templates in the dashboard with a live preview. Developers reference them by ID from application code. The two workflows stay independent and version-controlled.

Localisation

Per-recipient variables include language and locale. Conditional blocks render the right translation, currency, and date format without forking your application logic.

A/B testing variants

Mark a template as A/B and PostStack splits subject lines and bodies across variants automatically. Engagement metrics roll up per variant in the analytics dashboard.

How it works

PostStack templates use Handlebars syntax — `{{name}}`, `{{#if vipCustomer}}`, `{{#each items}}` — so you get conditionals and loops without inventing a new templating language. React Email is fully supported: build a component, compile it to inline-styled HTML, and PostStack stores the compiled output. Every save creates a new version, so you can roll back to any prior revision in one click. Templates are validated on save: missing required variables, unclosed tags, and malformed HTML are caught before the template can be used in production. Preview mode renders the template with sample data, including dark-mode and mobile previews, before you publish. Templates can be marked draft, published, or archived; only published templates are accepted by the send API, so you cannot accidentally ship an unfinished draft. Variables can be required or optional, with sensible defaults at the template level. Custom email-safe CSS is auto-inlined so the styling survives Gmail, Outlook, and every major client. Attachments (e.g. an invoice PDF) can be attached at send-time and combined with template content seamlessly.

Frequently asked questions

Do you support React Email?

Yes. Author your template as a React component, run the React Email build, and upload the resulting HTML to PostStack. The component-based workflow is fully supported and is the recommended path for teams already using React in their frontend.

Can non-developers edit templates?

Yes. The dashboard editor is designed for marketers and designers. They can edit copy, swap images, and rearrange blocks with a visual preview. Developers reference the template by ID, so the editing workflow does not require a code deploy.

What templating engine is supported?

Handlebars (with `{{variable}}`, `{{#if}}`, `{{#each}}`, and `{{#unless}}`). It is widely used and well-documented, so you do not need to learn anything new if you have used Mustache, EJS, or similar.

Can I send the same template with different content?

Yes — pass `variables` on every send. The same template renders different output for each recipient. Variables are scoped per-send and cannot leak between recipients.

How does versioning work?

Every save creates a numbered version. The dashboard shows a side-by-side diff between any two versions. Rollback is a single button click — the template is restored and immediately available to the API.

Related features

Ready to start sending?

Free plan includes 3,000 emails/month. No credit card required.