Back to Templates
Template Engine

Handlebars Syntax

Write {{variable}} placeholders, {{#if}} branches and {{#each}} loops, then pass template_variables on the send call. PostFrame renders the template server-side with a fixed set of safe helpers.

Template Logic

Variable interpolation
Insert recipient names, order details, and custom data with {{variable}} syntax
Conditional blocks
Show or hide content based on data with {{#if}} and {{else}} blocks
Iteration loops
Render lists of items like order line items with {{#each items}}
Safe helpers
eq, neq, gt, lt, and, or, not, uppercase, lowercase, truncate and formatDate — no arbitrary code runs inside a template
Syntax Examples
{{firstName}}
Simple variable interpolation
{{#if isPremium}}...{{/if}}
Conditional content blocks
{{#each orderItems}}...{{/each}}
Loop through arrays of data
{{uppercase status}}
Built-in text helper
Questions

Common questions, straight answers.

Which helpers are available inside a template?

eq, neq, gt, lt, and, or, not, uppercase, lowercase, truncate and formatDate. Handlebars runs in a sandboxed renderer, so templates cannot execute arbitrary code.

How do variables get into the template?

Pass template_id plus a template_variables object on the send call. PostFrame renders the subject and body server-side with those values before the message is queued.

Can I preview a template before saving it?

Yes. The templates API has a preview endpoint that renders arbitrary HTML with sample variables, and the editor shows a live preview as you type.

Is there an alternative to Handlebars?

Yes. A template can be typed as React Email: you write JSX, and PostFrame compiles and renders it in a sandbox to HTML plus a plain-text alternative.

Run your business from one place.

Five plans, seventeen launch apps, one dashboard. Set up in under 5 minutes — change tiers any time.

From $0 · Basic $9.95/mo · Save 20% on annual billing · Upgrade or downgrade any time