K2 blackpearl Installation and Configuration Guide > Installation > Integration Configuration > K2 SmartActions > E-mail ProtocolSetup | Send feedback |
![]() |
This topic outlines the messaging protocols which require additional setup post installation in order to be SmartActions-enabled. The Exchange Server option is omitted from this section as it is supported out of the box. |
![]() |
For all options supported, the K2 Server requires a unique e-mail address to be configured before the K2 installation or upgrade proceeds. If no e-mail address is available and K2 SmartActions is a requirement for installation, it is advised that the installation be postponed or the K2 SmartActions option not be installed until the e-mail address is available. |
Configuring the e-mail options manually requires that connection strings are added to the K2 Server configuration file (K2hostserver.exe.config). The <connectionsStrings> section of the config file is encrypted. To edit the connection strings the user needs to delete the entire section:
![]() |
---|
<!-- Host Server DB Connection Settings --> |
And replace it with a copy of the commented-out section at the bottom of the file under the text:
**** USE THE SETTINGS BELOW TO REPLACE ENCRYPTED SECTION..
**** CONNECTION STRINGS WILL AUTOMATICALLY BE ENCRYPTED ON STARTUP..
![]() |
---|
<connectionStrings> |
Then the user needs to edit the section to match the local environment and restart the server to re-encrypt the connection strings section.
It is best-practice to back-up the K2hostserver.exe.config file before editing it.
Use the following guidelines for populating the connection strings manually:
![]() |
Exchange Autodiscover must be set up on the domain for “Autodiscover=True” to work. |
Each EWS connection is started at server boot time, it is recommended to only have one – but multiple accounts are supported. The connection string takes the format:
![]() |
---|
Autodiscover={True/False};Url={EWS URL,not supported if Autodiscover is True};User ID={Login User,optional};Password={Password,optional};Poll Interval={Optional, Default 30S} |
Thus valid connection strings are:
![]() |
---|
<connectionStrings> |
Poll Interval: You can use S, M, H, D for the units (seconds, minutes, hours, days respectively). Remember if you manually update the connection strings you need to replace the old connectionStrings element. It is also recommend that you keep a backup of what you paste in as the section automatically gets encrypted when HostServer boots. Remember that the poll interval is also ignored if the previous check resulted in mail – it only comes into play when a check for mail returned nothing.
SMTP accounts are discovered (using the connection string type "SourceCode.Net.Mail.SmtpConnection") when a message is sent via SMTP; if no connection string can be found for a specific address a connection string with the exact name "SourceCode.Net.Mail.SmtpConnection" is used (it is recommended that this connection string is present and anonymous). The connection strings take the format:
![]() |
---|
Host Name={SMTP Server};Port={Port};Tls={BootTls/None};Authentication={Windows/Plain/Anonymous};User ID={Login User};Password={Password} |
Thus valid connection strings are:
![]() |
---|
<add name="SourceCode.Net.Mail.SmtpConnection" connectionString="Host Name=mail.denallix.com;Authentication=Anonymous" /> |
![]() |
It is recommended to use authenticated SMTP for known accounts (Authentication is not “Anonymous”) as most mail servers will not spam filter authenticated SMTP messages. |
Further Notes
Remember to retain any database connection strings, for example “HostServerDB”.