Overview

Mailjet's template language allows you to push the boundaries of the personalisation of an email.

More than just substitutions of a text, it lets you leverage conditions, loops, functions and multiple data sources.

With the Mailjet's template language for transactional messages, designing and building dynamic emails, that can highly adapt to your recipients' profiles, has never been easier.

Note

Mailjet Template language is available for transactional messages only.

As Mailjet templating language is following a syntax close to the one used by the most popular template languages, such as Jinja2 or Twig, it can be already familiar to you.

<html><body>
{% if data:age > 45 %}
<ul>
    <li>{{data:age}}</li>
</ul>
{% endif %}
</body></html>

Go beyond simple personalisation tags by adding logic into your email to include/remove sections of the delivered message.

Additionally, Mailjet's Template API allows you to store your templates on the Mailjet system. There is no need to provide the whole content of your message at each call to the Send API anymore, just use your predefined template.

You can create your template, leveraging our template language, in multiple ways: either through Passport - our drag and drop email design tool - MJML - the open source responsive email framework we created - or even with simple HTML.