Problem
In an environment with SMTP configured, email notifications from a workflow are not able to send out. The below error can be seen flooding the HostServer logs when sending a notification for a task:
'Error','MessageBus','61007','SendMessageException','MessageBusRuntime','61007 Permanent failure sending message New Task: System.Net.Mail.SmtpException: The operation has timed out.
Solution
Please check the following:
1. Open the ConnectionStringEditor.exe found in {K2 Install Folder}\HostServer\bin and check whether the Mail Server and Port values are correct. If it is incorrect, update the Mail Server value to the correct SMTP server and port number accordingly. Port number 25 is the recommended port number for SMTP communications between mail services.
2. Open K2 Management, navigate to the default Environment Library and check if the Mail Server environment field value is correct as well. It needs to match up with the Mail Server value in your connection strings.