{{name}}
Email2 min read

Templates

Write an email once and send it with a different name, amount or link every time. Your code sends the template and the values, Rimbra does the rest.

Variables
{{double braces}} in the subject and body
Formats
HTML or plain text
Safety
Values are escaped in HTML
Used by
The API and broadcasts

Write it once

Receipts, welcome emails and reminders look the same every time except for a few details. Templates keep the design and the words in one place, and leave gaps for the details. Your code stays short, and anyone on the team can fix a typo without a deploy.

Create a template

  1. 01

    Open Emails → Templates and choose New template.

  2. 02

    Write a subject and a body in HTML or plain text.

  3. 03

    Wrap the parts that change in double braces, like {{name}} or {{amount}}.

  4. 04

    Fill in the preview values to see how it looks, then save and copy its ID.

Send it from your app

Send the template ID and the values to the same endpoint you use for any email. If a value is missing, the request is rejected and nothing is sent, so a customer never gets an email that says “Hi {{name}}”.

Good to know

  • Values are escaped in HTML templates, so user input can’t inject markup.
  • Editing a template keeps its ID. Duplicate it to start a new one.
  • Variable names can use letters, numbers, dots, dashes and underscores.
  • Broadcasts can start from a template too.

Questions

Do I need to redeploy after editing a template?

No. The next email sent with that ID uses the new version.

What happens if I delete a template?

Requests that use its ID fail, so update your app first.

Launch it on Rimbra.

Free to start. No card. Your first app is live in about a minute.