Mail templates
Administration Page | Application/Contract | Syracuse/Collaboration | class | mailTemplates | Representation | mailTemplate |
---|
This entity allows you to define how you can send emails automatically from an entity (the sender entity needs to be defined as notifiable in order to be operational). The email recipients, the subject, and the body of the email can be described, and the data can be retrieved from the sender entity.
Currently, only two entities have this feature set: 'Logfiles management' and 'Flamegraph visualization'.
The following information can be associated with an email template:
Identifies the email template
Identifies the sender of the email and must be a valid email address
In the following fields, you can enter text and embedded variables in mustache format:
List recipients' email addresses separated by commas
List carbon copy email addresses separated by commas
List blind carbon copy email addresses separated by commas
The email subject in text format
The body of the email in HTML format
These fields do not allow the inclusion of mustache variables:
A list of property names (separated by commas) that stores mandatory files to be attached
A list of property names (separated by commas) that stores optional files to be attached
Defines the theme used to send the notification
Indicates the endpoint on which the entity associated with the email template has been set
Indicates the representation of the entity associated with the email template
Defines the entity managed by the previous representation
Here are some interesting syntax examples:
For example: If you have a collection (users) that has two properties (name, firstName).
In HTML, the following syntax for a two-line bullet list is
<ul><li> element 1 </li><li> element 2 </li></ul>
{{#users}}<ul><li> {{name}}, {{firstName}}</li></ul>{{#users}}
{{#users}}
syntax); the syntax in the <li> {{name}}, {{firstName}}</li>
executes on the current collection line for the given properties.The HTML syntax given in the body generates the HTML that is embedded in an email theme if one has been created. It is important to use the syntax {{{template}}}
in the theme definition to transfer the body created without escaping the HTML that is generated in the template.