TEMPLATES

Design an email once. Send it from anywhere.

Reusable templates with typed variables, version history, and live preview. Author in the dashboard, render from the API — one source of truth for every receipt, reset link, and broadcast you send.

One template, every send path

The same template powers your password reset, your invoice, and your monthly newsletter. Transactional and broadcast render from the identical definition — so your brand never drifts between the two.

01 / VARIABLES

Typed merge variables

Declare the fields a template expects — first_name, reset_url, invoice_total. Pass them at send time and mailstein renders the final HTML. Missing a required variable fails loud, before the email leaves your server.

02 / VERSIONING

Every edit is a version

Change the copy on a live template and the previous version is kept, not overwritten. Compare revisions, roll back a bad edit, and pin an API call to a specific version when you need send-for-send reproducibility.

03 / PREVIEW

Preview with real data

Fill in sample variables and see the rendered email exactly as the inbox will — before you wire it into code or push a broadcast to your audience. No test sends to yourself to check a stray {{ }}.

Author once, render two ways

Reference a template by ID from the REST API, or select it in the campaign composer. Same rendering engine, same result.

FROM YOUR CODE

Send a template by ID

Point an API call at a template and hand it the variables. mailstein renders, signs it with your DKIM key, and sends from your own IP through Postal. No HTML in your application code, no redeploy to fix a typo in the footer.

// render + send a stored template await mailstein.emails.send({ from: "receipts@boardpearls.com", to: user.email, template: "invoice-paid", version: "latest", variables: { first_name: user.firstName, invoice_total: "$129.00", invoice_url: invoice.hostedUrl } })

What you get with every template

CONSISTENCY

Branding that can't drift

Shared header, footer, colors, and unsubscribe block live in the template — not copy-pasted across a dozen code paths. Update the footer once and every future send inherits it, transactional and broadcast alike.

Change your logo, and you're not hunting through seven microservices to find where the old one is still hard-coded.
SAFETY

No broken sends in production

Required variables are enforced at render time and previews use real sample data, so a malformed template surfaces in your dashboard — not in a customer's inbox. Pin a version and a send is reproducible months later.

A marketer edits the welcome email at 5pm; the pinned API version your signup flow uses keeps sending the copy you approved.

Design it once. Own every send after.

Reusable templates, versioning, and live preview come standard — free for your first 50 emails a month, one domain, no card.

Start free