Email templates
Email templates allow you to customize the look and feel of your emails.
Composition
An email template is defined by a single subject and content, which can be translated into multiple languages.
The subject is the subject of the e-mail that will be sent to the recipients.
The content of the template is a chunk of code allowing you to model the structure of your PDF. In order to facilitate the layout of your template, it is possible to use the template language Liquid. The latter allows you to use variables, conditional branches, and other statements to create your model using a pseudo-language.
Case study
Here's an example of a valid template content for User data:
liquid
<table>
<thead>
<tr>
<th>Email</th>
<th>First name</th>
<th>Last name</th>
<th>Role</th>
<th>Teams</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{ email }}</th>
<td>{{ first_name }}</td>
<td>{{ last_name }}</td>
<td>{{ role.name }}</td>
<td>
{% for team in teams %}
{{ team.name }}
{% endfor %}
</td>
</tr>
</tbody>
</table>