...
Property | Description | Required |
---|---|---|
mail.clients | A comma-separated list of FEJ SMTP client IDs | Y |
mail.<clientId>.host | The SMTP server to connect to | Y |
mail.<clientId>.port | The SMTP server port to connect to | Y |
mail.<clientId>.username | The SMTP user name to connect with | Y |
mail.<clientId>.password | The SMTP user's password. Optional if SMTP supports user access without a password. | N |
mail.<clientId>.protocol | Protocol for connection to the SMTP server. 'smtp' supported. | N |
mail.<clientId>.subject | Default email's subject | Y |
mail.<clientId>.to | Default email's 'To' comma-separated list | Y |
mail.<clientId>.cc | Default email's 'Cc' comma-separated list | N |
mail.<clientId>.bcc | Default email's 'Bcc' comma-separated list | N |
mail.<clientId>.groups | FEJ groups for routing to this SMTP endpoint | N |
mail.<clientId>.converterRef | An instance of the email converter interface, as a reference to the Spring bean name, to convert incoming MessageEvent to email fields. | N |
mail.<clientId>.converterClass | Implementation class of the email converter interface to create a converter instance on endpoint initialization. By default, an implementation based on Apache Velocity templates is used. | N |
...
Property | Description |
---|---|
mail.smtp.from | Email address to use for the SMTP MAIL command. This sets the envelope return address. |
mail.smtp.auth | If true, attempt to authenticate the user using the AUTH command. |
mail.smtp.socketFactory.port | Specifies the port to connect to when using the specified socket factory. |
mail.smtp.socketFactory.class | If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets. |
mail.smtp.starttls.enable | If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. If the server does not support STARTTLS, the connection continues without the use of TLS; see the mail.smtp.starttls.required property to fail if STARTTLS isn't supported. |
mail.smtp.starttls.required | If true, requires the use of the STARTTLS command. If the server doesn't support the STARTTLS command, or the command fails, the connect method will fail. |
template | Path to the Velocity template file for the default email converter interface. See more at Template converter properties. |
The full list of properties could be found here.
NOTE: The FIX session can be started or stopped only if scheduling is applied. Otherwise, the session will be inactive. Refer to the Configuring Scheduler section where the session start procedure is specified.
...
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:
...