SMTP Adaptor
- 1 Overview
- 2 Configuration
- 2.1 Transport adapter properties
- 2.2 Parameters for multiple sessions
- 2.2.1 TransportLayer.SmtpTA.SMTPSessions
- 2.2.2 TransportLayer.SmtpTA.SMTPSessions.DefaultServerName
- 2.2.3 TransportLayer.SmtpTA.SMTPSessions.DefaultServerPort
- 2.2.4 TransportLayer.SmtpTA.SMTPSessions.DefaultFrom
- 2.2.5 TransportLayer.SmtpTA.SMTPSessions.DefaultCC
- 2.2.6 TransportLayer.SmtpTA.SMTPSessions.DefaultBCC
- 2.2.7 TransportLayer.SmtpTA.SMTPSessions.DefaultSmartEmailProcessing
- 2.2.8 TransportLayer.SmtpTA.SMTPSessions.DefaultSendingTimeout
- 2.2.9 TransportLayer.SmtpTA.SMTPSessions.DefaultConnectionTimeout
- 2.2.10 TransportLayer.SmtpTA.SMTPSessions.DefaultOmitOriginalFixMessage
- 2.3 Parameters for a specific session
- 2.3.1 TransportLayer.SmtpTA.SMTPSession.<Session>.ServerName
- 2.3.2 TransportLayer.SmtpTA.SMTPSession.<Session>.ServerPort
- 2.3.3 TransportLayer.SmtpTA.SMTPSession.<Session>.SecureConnection
- 2.3.4 TransportLayer.SmtpTA.SMTPSession.<Session>.Login
- 2.3.5 TransportLayer.SmtpTA.SMTPSession.<Session>.Password
- 2.3.6 TransportLayer.SmtpTA.SMTPSession.<Session>.From
- 2.3.7 TransportLayer.SmtpTA.SMTPSession.<Session>.To
- 2.3.8 TransportLayer.SmtpTA.SMTPSession.<Session>.CC
- 2.3.9 TransportLayer.SmtpTA.SMTPSession.<Session>.BCC
- 2.3.10 TransportLayer.SmtpTA.SMTPSessions.<Session>.SmartEmailProcessing
- 2.3.11 TransportLayer.SmtpTA.SMTPSessions.<Session>.SendingTimeout
- 2.3.12 TransportLayer.SmtpTA.SMTPSessions.<Session>.ConnectionTimeout
- 2.3.13 TransportLayer.SmtpTA.SMTPSession.<Session>.OmitOriginalFixMessage
- 3 Integration with FIXEdge
- 4 Monitoring (view logs)
- 5 FAQ
- 6 Troubleshooting
Overview
The SMTP Transport Adaptor (hereinafter the SMTP adaptor) is intended to send FIX messages from the FIXEdge server to clients using the SMTP protocol.
Configuration
The SMTP adaptor is configured using the following properties:
Property name | Description |
|---|---|
Transport adapter properties | |
TransportLayer.SmtpTA.DllName | Contains path and name of the SMTP adaptor DLL. In case this parameter is not specified, the TransportLayer.SmtpTA.AdapterId is applied to define the adapter's library by ID Several instances of SMTP TA can be created using the same shared library since FIXEdge C++ 6.14.0. The property is required. |
TransportLayer.SmtpTA.AdapterId | The parameter to define the adapter's library by ID. In case this parameter is not specified, or TransportLayer.SmtpTA.DllName parameter is specified too, the TransportLayer.SmtpTA.DllName is applied This parameter is applicable since FIXEdge C++ version 6.14.0 Required value: SMTP. The property is not required. |
TransportLayer.SmtpTA.Description | Adaptor name. |
TransportLayer.SmtpTA.Type | Type of the adaptor library. Should be 'DLL'. The property is not required. |
Parameters for multiple sessions |
|
TransportLayer.SmtpTA.SMTPSessions | This parameter determines the names of SMTP clients. The SMTP Client name is used as a reference of the Client in BL and JavaScripting for the <Send /> action and the send(<session source identifier>) JavaScript function. Multiple sessions here may be used in cases when it is needed to react to a different type of events differently and send them to various recipients depending on the business case. Default value: SMTP |
TransportLayer.SmtpTA.SMTPSessions.DefaultServerName | Default SMTP server name or IP address. |
TransportLayer.SmtpTA.SMTPSessions.DefaultServerPort | Default SMTP server port. |
TransportLayer.SmtpTA.SMTPSessions.DefaultFrom | The default value of the 'From' field. |
TransportLayer.SmtpTA.SMTPSessions.DefaultCC | The default value of the 'CC' field. |
TransportLayer.SmtpTA.SMTPSessions.DefaultBCC | The default value of the 'BCC' field. |
TransportLayer.SmtpTA.SMTPSessions.DefaultSmartEmailProcessing | When true, the corresponding tags will be used for e-mail Subject and Body at FIX EMail message conversation. |
TransportLayer.SmtpTA.SMTPSessions.DefaultSendingTimeout | Sending message timeout, common for all SMTP sessions. |
TransportLayer.SmtpTA.SMTPSessions.DefaultConnectionTimeout | SMTP server connection timeout, common for all SMTP sessions. |
TransportLayer.SmtpTA.SMTPSessions.DefaultOmitOriginalFixMessage | Requires SmartEmailProcessing to be enabled. Controls the inclusion of the "Original FIX message" block in all SMTP session emails. Default: false (block is included). Set to true to disable globally unless overridden by a session setting. The property is not required. |
Parameters for a specific session |
|
TransportLayer.SmtpTA.SMTPSession.<Session>.ServerName | SMTP server name or IP address. |
TransportLayer.SmtpTA.SMTPSession.<Session>.ServerPort | SMTP server port. The property is required when DefaultServerPort is not defined. |
TransportLayer.SmtpTA.SMTPSession.<Session>.SecureConnection | Type of secure connection: TLS, SSL. |
TransportLayer.SmtpTA.SMTPSession.<Session>.Login | User login. |
TransportLayer.SmtpTA.SMTPSession.<Session>.Password | User password. |
TransportLayer.SmtpTA.SMTPSession.<Session>.From | Value of the 'From' field. |
TransportLayer.SmtpTA.SMTPSession.<Session>.To | Value of the 'To' field. |
TransportLayer.SmtpTA.SMTPSession.<Session>.CC | Value of the 'CC' field. |
TransportLayer.SmtpTA.SMTPSession.<Session>.BCC | Value of the 'BCC' field. |
TransportLayer.SmtpTA.SMTPSessions.<Session>.SmartEmailProcessing | Allows to convert Email (C) message to email and use the corresponding tags as email content, if it set to true. The subject is taken from (147) Subject and a body is composed of (58) Text tag values entries of the repeating group with a size defined in (33) LinesOfText in this case. The property is not required. |
TransportLayer.SmtpTA.SMTPSessions.<Session>.SendingTimeout | Message sending timeout, defined for a specified session. |
TransportLayer.SmtpTA.SMTPSessions.<Session>.ConnectionTimeout | SMTP server connection timeout, defined for a specified session. |
TransportLayer.SmtpTA.SMTPSession.<Session>.OmitOriginalFixMessage | Requires SmartEmailProcessing to be enabled. Controls the inclusion of the "Original FIX message" block in a SMTP session emails. Overrides the global default for individual sessions. Default: false. Set to true to exclude the block for that session. The property is not required. |
The changes in the FIXEdge properties file are applied only after the FIXEdge restart.
Integration with FIXEdge
Execute the following steps to integrate the SMTP adaptor into the FIXEdge:
Open the FIXEdge properties file (FIXEdge.properties by default).
Find the 'TransportLayer.TransportAdapters' property or add the property if it does not exist
Set 'TransportLayer.SmtpTA' to the value of the 'TransportLayer.TransportAdapters' property:
TransportLayer.TransportAdapters = TransportLayer.SmtpTAIf the 'TransportLayer.TransportAdapters' property has a value already, append ',TransportLayer.SmtpTA' to the value:
TransportLayer.TransportAdapters = <... the list of the other adapters>, TransportLayer.SmtpTA
Add the 'TransportLayer.SmtpTA.Description' property with the value - SMTP adaptor name:
TransportLayer.SmtpTA.Description = SMTP Transport Adaptor DLLAdd the 'TransportLayer.SmtpTA.DllName' property with the value - path to the SMTP adaptor library:
TransportLayer.SmtpTA.DllName = bin/SMTPAdaptorDll.dllAdd the set of default properties:
TransportLayer.SmtpTA.SMTPSessions.DefaultServerName = mail.test_test.com TransportLayer.SmtpTA.SMTPSessions.DefaultServerPort = 25 TransportLayer.SmtpTA.SMTPSessions.DefaultSendingTimeout = 10 TransportLayer.SmtpTA.SMTPSessions.DefaultConnectionTimeout = 10 TransportLayer.SmtpTA.SMTPSessions.DefaultSmartEmailProcessing = falseAdd the TransportLayer.SmtpTA.SMTPSessions property with value - the set of SMTP client's names:
TransportLayer.SmtpTA.SMTPSessions = SMTPClientAdd properties for each client, like this:
TransportLayer.SmtpTA.SMTPSession.SMTPClient.ServerName = mail.test_test.com TransportLayer.SmtpTA.SMTPSession.SMTPClient.ServerPort = 25 TransportLayer.SmtpTA.SMTPSession.SMTPClient.To = jsg@test_test_btobits.com TransportLayer.SmtpTA.SMTPSession.SMTPClient.From = jsg@test_test_btobits.com TransportLayer.SmtpTA.SMTPSession.SMTPClient.CC = TransportLayer.SmtpTA.SMTPSession.SMTPClient.BCC =Restart the FIXEdge server to apply changes.
After changes are applied, the FIXEdge properties file may look like this:
#------------------------------------------------------------
# Transport Layer Section
#------------------------------------------------------------
TransportLayer.TransportAdapters = TransportLayer.SmtpTA
#------------------------------------------------------------
# SMTP Adaptor settings
#------------------------------------------------------------
# SMTP adaptor name
TransportLayer.SmtpTA.Description = SMTP Transport Adaptor
# Contains path and name of the SMTP adaptor dll. Property is required
TransportLayer.SmtpTA.DllName = ./bin/SMTPAdaptorDll.dll
# Type of the adaptor library, has contains value 'DLL'. Property is required
TransportLayer.SmtpTA.Type = DLL
TransportLayer.SmtpTA.SMTPSessions = SMTPClient
# SMTP server host. Required when DefaultServerName not defined
TransportLayer.SmtpTA.SMTPSession.SMTPClient.ServerName = mail.test_test.com
# SMTP server port. Required when DefaultServerPort not defined
TransportLayer.SmtpTA.SMTPSession.SMTPClient.ServerPort = 25
# email receiver. Required
TransportLayer.SmtpTA.SMTPSession.SMTPClient.To = jsg@test_test_btobits.com;
# email sender. Required when DefaultFrom not defined
TransportLayer.SmtpTA.SMTPSession.SMTPClient.From = jsg@test_test_btobits.com
# email CC receivers. Not required
TransportLayer.SmtpTA.SMTPSession.SMTPClient.CC =
# email BCC receivers. Not required
TransportLayer.SmtpTA.SMTPSession.SMTPClient.BCC =Monitoring (view logs)
By default, the SMTP adaptor puts log messages into the FIXEdge log. Execute the following steps to configure the SMTP adaptor logging into a separate file:
Open the FIXEdge properties file
Add 'Log.SmtpAdaptorTransportLayer.SmtpTA.File.Name' property with value - path and name of the SMTP adaptor log file.
Log.SmtpAdaptorTransportLayer.SmtpTA.File.Name = SMTP.logRestart FIXEdge server
When the SMTP adaptor starts, the following record will be written into the log file (xxx is the SMTP adaptor version):
[NOTE] 20070215-11:20:12.437 - SMTP Adaptor v.xxx started.FAQ
Q: Is it possible to use another prefix of the SMTP adaptor properties (not 'TransportLayer.SmtpTA')?
A: The SMTP adaptor requires the 'TransportLayer.SmtpTA' prefix for adaptor's properties, another prefix is prohibited.
Q: How to check network configuration is allowed to send emails from the host.
A: A test email can be sent with smtp-source SMTP/LMTP test generator tool:
smtp-source -v -f <from> -t <to> -S "Test Email" <email_server>
Troubleshooting
Problem | Solution |
|---|---|
FIXEdge start fails and the FIXEdge log file contains the following record: [FATAL] 20070215-11:42:25.250 - Transport Layer has failed to initialize: Error loading DLL './/../SMTPAdaptorAddin.dll '. : The specified module could not be found. (126) | FIXEdge is unable to find the SMTP adaptor library file. Make sure that 'TransportLayer.SmtpTA.DllName' contains a valid path and name. |
FIXEdge start fails and the FIXEdge log file contains the following record: [FATAL] 20070215-11:45:12.312 - Transport Layer has failed to initialize: Cannot find the 'TransportLayer.SmtpTA.XXX' property. | The SMTP adaptor was not configured properly. The required 'TransportLayer.SmtpTA.XXX' property does not exist in the FIXEdge property file. |
FIXEdge is started but the FIXEdge log file does not contain the 'SMTP Adaptor v.xxx started' record. | Make sure that the SMTP adaptor was configured properly in the FIXEdge property file:
Make sure that the FIXEdge log file does not contain any related error messages. |