The following changes in K2 4.6.5 make it easier to install and configure the Exchange Integration:
The K2 Setup Manager is enhanced to use Exchange Autodiscover to pre-populate the required Exchange server settings, making the install experience easier and faster. However, if Autodiscover is not enabled on the Exchange server, you must manually configure the settings. It is recommended that Autodiscover be available in your environment prior to installation. Autodiscover is used before making a call to Exchange. The K2 Service Account’s email address is used for the discovery process, however for Online the specified account is used.
Online: Exchange Online always has Autodiscover available. During the setup you are asked for an email address and password of one of the online accounts, this account is used for the discovery process and to reply to SmartActions. Recommendation: Use the K2 Service email account in Active Directory as the Online account. Note that the Exchange Online integration only uses Static credentials for all interaction with Exchange. RunAs does not apply when configuring Exchange Online.
Autodiscover provides the following values required by the K2 Setup Manager:
If you require Exchange integration for SmartActions but use a different SMTP server, you must configure this manually post-installation using the Connection String Editor found in the [program files]K2 blackpearl\Host Server\Bin folder. See the Exchange/SMTP Mixed Mode section below.
There are three screens in the installer that deal with the Exchange configuration:
Here you select whether or not your environment requires Exchange Integration. Selecting the Use Exchange for mail integration will configure the following functionality:
The EWS URL is a required field that can be discovered by clicking the Discover button, or the URL can be typed in the text field and subsequently verified by clicking the Test button.
Uses the Exchange Admin and the Exchange Management SmartObjects to allow the functionality to enable and disable mailboxes, send calendar and task requests, and check for meeting availability. On this screen if Autodiscover is enabled it is used to discover the required settings. This screen is dependent on the “Use Exchange for mail integration” checkbox being selected on the first Exchange panel in the Setup Manager.
The following logic applies when selecting Configure Exchange On-premises or Configure Exchange Online on the Exchange Server Configuration screen:
On this screen you select whether or not SmartActions are used in the environment and define the e-mail account to be used by SmartActions.
The SMTP screen is no longer required when configuring Exchange Integration. However, if installing in an environment that will not make use of Exchange but a different mail provider the SMTP screen will be displayed to allow for the required configuration. The connection string created by K2 Setup Manager will be an anonymous connection string. To change this to authenticated SMTP you must manually change the connection string using the ConnectionStringEditor.exe found in the ..\K2 blackpearl\Host Server\Bin folder.
When configuring for Exchange Online the static account used to install with needs to be part of the “Organizational Management” role group in Exchange. This is required for the analysis to be performed.
When installing the Autodiscover flag is set to TRUE. If Autodiscover fails an exception is raised notifying the installer. If Autodiscover is not enabled the installer is required to manually input the required fields. It is suggested in this instance that the following details are known before installing K2:
The K2 Setup Manager guides you through the installation process. For more information refer to the K2 Installation and Configuration documentation.
When upgrading to K2 4.6.5 the Autodiscover flags are set to False. This ensures that the environment continues to function as in previous versions. If you want to make use of the new integration settings and functionality, upgrade to K2 4.6.5 and then reconfigure your environment by re-running the K2 Setup Manager and update the design templates of each existing workflow.
When the Use previously configured values checkbox is unchecked on an upgrade, with the functionality gained through Autodiscover the Advanced Settings screen available in the E-mail Event and in escalations allowing for the configuration of SMTP settings are no longer required. When upgrading this advanced screen is visible in the wizards, but when the Design Templates are updated the mail server screen no longer appears. New events do not have this screen.
For existing processes it is possible to send mail with Authenticated SMTP. Follow the steps below for On-premises and Online to send mail with Authenticated SMTP:
For authenticated SMTP, every From address that will be used to send mails should be supplied a corresponding connection string. Use the ConnectionStringEditor.exe found in the ..\K2 blackpearl\Host Server\Bin folder.
If the SMTP server is configured so that the authenticated sender must use a valid sender address, then every SMTP connection string should contain the credentials corresponding to the connection string identity (email address) and Authentication should be set to “Plain”.
Known Issue: When deploying pre K2 blackpearl 4.6.5 workflows either in the K2 designers or using K2 Package and Deployment in a clean Exchange Online environment, the E-mail event and mail Escalations will fail with a timeout exception and the workflows will go into an error state.
Workaround: Update the Design Templates and redeploy the workflow.
If the K2HostServer service account’s e-mail address is different from the From Address specified, the K2HostServer account will have to have Send As permissions on the From account’s mailbox. To configure SendAs permissions refer to the following articles:
For Exchange Services (Meetings, Tasks, Mailboxes) for Online Integration the following rights will be required:
When configuring for Exchange Online the static account used to install with needs to be part of the “Organizational Management” role group in Exchange. This is required for the Configuration analysis to be performed.
A mixed mode environment is possible but will require additional manual configuration to setup the SMTP. For sending mails and escalations K2 will first look for and use the SMTP settings and if not found will then look for and use the EWS URL. For notifications, SmartActions and Exchange services (Meetings, Tasks, Mailboxes) K2 will always use the EWS URL.
When troubleshooting view the hostserver log files for error and warning messages. Below describes some issues that could be encountered: