Skip to main content

Templating

We support email templating using the mustache templateing engine. This is an optional feature that can be toggled on a per-list basis. In most cases a dedicated prebuild template is the better solution.

Unstable feature

This feature si currently being reworked. The API may change completely and should currently be considered experimental at best.

Contexts

Contexts are the instantiation of template variables per request. There are some system contexts that provide basic data on the request (like from, to, ...) and Custom contexts that allow admins to provide arbitrary data.

System contexts

The system contexts are very sparse in what they provide. Usually these are best used for testing and have limited real-world uses.

User contexts

You may provide arbitrary context values to your template engine. User contexts can be either static values or dynamic based on the email target.

Static

Static contexts are simple mappings of a key to a single value. you can use this for values that might change but you dont want to remember or mistype like Locations, IBANs or similar nonpersonalized data.

Dynamic

Dynamic contexts are conditioned on the target email address. for any given key you can provide (email,value) pairs that then get resolved. a dynamic context value that is not set will default to a fallback value you can define.

Email templates

Im many cases it is more useful to template the entire email and then just provide context data. Especially for recurring emails like invoices or formal requests.

Templates are seperate from lists and you can read more about them here.