Email templates
Email templates
If you need to include graphics in the design we recommend using inline base64 images.
CSS is easily embeddable inside style tags
Wrapping emails
It is possible to wrap all emails sent by the system in an MJML or HTML wrapper.
Our implementation of the MJML engine is a bit unstable, so it is recommended to build the wrapper using MJML, then exporting the HTML version and uploading that to the platform.
Two tags are available: [SUBJECT]
and [BODY]
SUBJECT will be replaced with the subject of the given email.
BODY will be replaced with the email-content of the given email.
To enable email-wrapping, set the Policy defaultEmailTemplateID
to the ID of the template.
You can control whether the content of the email is inserted into the template before or after rendering, via the Policy emailDoInsertBeforeRender
.
Inserting data
To insert data from a record,,into an email, the following syntax is used.
{FIELDNAME}
Custom functions
A couple of functions are implemented, allowing minor modification of data from fields, before inserting it.
Syntax: @[FUNCTION]({FIELDNAME} [PARAMETER])
Function: FALLBACK
Sample: @FALLBACK({NAME} Friend)
If the given field does not have a value, or is not found, the PARAMETER value will be used instead.
Function: DATEADD
Sample: @DATEADD({DATE} 3 weeks)
If the given field is a Date, Time or DateTime field, the value is modified by the given amount (positive or negative)
Supports wrapping inside FORMAT (see below).
Supported periods: minute(s), hour(s), day(s), week(s), month(s), year(s)
Function: DATESUB
Sample: @DATESUB({DATE} 3 weeks)
If the given field is a Date, Time or DateTime field, the value is modified by the given amount (positive or negative)
Supports wrapping inside FORMAT (see below).
Supported periods: minute(s), hour(s), day(s), week(s), month(s), year(s)
Function: FORMAT
Sample: @FORMAT({NUMBER} 000.000)
or @FORMAT({DATE} MMM, d YYYY)
Formats a given number or date to the specified format.
Number formatting uses DecimalFormat and date formatting uses SimpleDateFormat.
It is possible to wrap this function around DATESUB and DATEADD like this: @FORMAT(@DATEADD({DATE} 3 weeks) MMM, d YYYY)
System templates
Templates can be changed in the designer: Modules > Configuration
Invitation template
HTML can be edited in Template.WelcomeUser and Template.WelcomeUserLink
Supported tags
- {APPLICATION}
- {LOGINURL}
- {USERNAME}
- {PASSWORD}
Password reset template
HTML can be edited in Template.PasswordReset and Template.PasswordResetLink
Supported tags
- {LOGINURL}
- {PASSWORD}
Reset via link-templates
Additional supported tags
- {PASSWORDLINK}
- {LINKLIFETIME}