...
Using templates for emails
If a custom implementation for the email converter interface is not defined, the SMTP endpoint uses a the default one, which is based on Apache Velocity. Velocity is a Java template engine with simple but powerful syntaxessyntax.
This converter may transform either a MessageEvent with FIX messages inside or an AppEvent if it was routed to an STMP endpointThe converter puts the received MessageEvent
object and all its header fields to the template context as shown in the table below:
Variable name | Variable type | Description |
---|---|---|
event | MessageEvent | original Original MessageEvent for converting to email. |
source | AppEvent | Predefined header field. Contains the The source |
email.template | String | Predefined header field. Custom template name. Can be set via the MessageEvent#setHeader() field. |
email.subject | String | Predefined header field. Custom email subject. Can be set via the MessageEvent#setHeader() field. |
The path to the template should be defined with the template
property in the configuration of the SMTP endpoint configuration. In the case where If the template is placed into the conf directory, the path can be relative:
...