Logo

How to Create Dynamic Email Templates

Last updated on October 22, 2026

Dynamic templates let one transactional email, such as an order confirmation or a password reset, show different content to every recipient, based on the data your app sends with each email.

Note: Dynamic templates are available for transactional emails. Support for campaigns and automations is coming soon.

What Dynamic Templates Are

A dynamic template contains placeholders, conditions and loops written in Handlebars. When your app sends an email, it includes data such as the customer's name, plan or order items, and Mailzzy fills the template in for that recipient.

Create a Dynamic Template

  1. Go to Templates and open Dynamic Templates.
  2. Select Design Template.
  3. Enter a template name (up to 60 characters). Each name must be unique.
  4. Choose Visual Builder or HTML Editor, then select Create. You can't change the editor later.
  5. Add a subject. You can use variables in it too, such as {{first_name}}.

Add Dynamic Content

ToWrite
Insert a value
{{first_name}}
Insert a nested value
{{order.total}}
Insert HTML without escaping it
{{{custom_html}}}
Show content only when a value is set
{{#if coupon}} … {{else}} … {{/if}}
Show content when a value isn't set
{{#unless paid}} … {{/unless}}
Compare values
{{#if (eq plan "pro")}} … {{/if}}
Repeat content for each item in a list
{{#each items}} {{name}} {{/each}}
  • Comparison helpers: eq, neq, gt, gte, lt and lte. Combine conditions with and, or and not.
  • Inside a loop, use {{this}} for the current item and @index, @first or @last for its position.
  • In the HTML Editor, the Merge tags panel inserts contact fields with one click and includes a Handlebars cheat sheet.

Note: If the data you send doesn't include a variable, it's left blank in the email. Empty text, 0, false and empty lists all count as "not set" in conditions, but the text "false" counts as set.

Preview with Test Data

  1. Select Preview, then Show Test Data.
  2. Enter sample data as JSON, for example { "first_name": "Ana", "plan": "pro" }.
  3. The preview updates as you type. Switch between Desktop and Mobile to check both.

Any variable your test data doesn't fill stays visible in the preview as {{variable}}, so you can spot what's missing. Your test data is saved with the template version.

Publish a Version

  • Save draft saves your changes without changing what's sent.
  • Save & activate makes this version live. Only the live version is used when you send.
  • Open a template's versions to add a new version, edit one or select Set active to switch which version is live.

Send a Test

Once a version is live, choose Send test from the template's menu. Pick a verified sender and an active sending domain, enter the address to send to, and adjust the subject and test data. Test emails count toward your monthly transactional email allowance.

Send with the API

Your developers send dynamic templates through Mailzzy's transactional email API. Choose Copy template ID from the template's menu and give them the ID. Each request includes the template ID, the recipient and the data for that email, and Mailzzy always sends the live version. See Dynamic Templates in the API docs for the full request format.

  • Each request sends to one recipient.
  • The sender must be verified and the sending domain must be active on your account.
  • The subject can be up to 90 characters after the variables are filled in.

Manage Your Templates

From each template's menu you can Edit, Duplicate, Rename or Delete it. Deleting a template removes all its versions. Use the filters to show All Templates or My Templates, and Live or Draft templates.

Related Help Articles

Need Help? We’ve Got You Covered!

Solve problems, explore tutorials, and get instant support.

Free support, anytime!

Company

Designed to meet WCAG 2.1 AAtx-ramp certification

Let's keep in touch

Sign up for our weekly email marketing newsletter and Mailzzy updates.

For more details, review our Privacy Policy

FacebookXYouTubeLinkedInInstagram

© 2026 Mailzzy. All rights reserved.

Google Play StoreApple App Store