Issue

'Send Email' steps are not sending emails and shows an error:
"SourceCode.Workflow.Common.EWS: Autodiscover not available and mail cannot be sent. Reconfigure K2 server with valid Exchange settings."

Symptoms

Errors on the host server logs show that the Exchange Server is throwing a 401 error:

  • "Error","General","0","ErrorMessage","SourceCode.Workflow.Common.EWS: ","0 Mail send failure: EWS URL is not valid. Verify the connection strings are correct. Exception: The request failed. The remote server returned an error: (401) Unauthorized." 
  • "Error","General","0","ErrorMessage","SourceCode.Workflow.Common.EWS: ","0 Autodiscover not available and mail cannot be sent. Reconfigure K2 server with valid Exchange settings." 
  • "Error","General","28083","ExtenderExecuteError","ProcessInstance.HandleException","28083 ServerEvent: SourceCode.Workflow.Common.EWS: Autodiscover not available and mail cannot be sent. Reconfigure K2 server with valid Exchange settings. InnerException: SourceCode.Workflow.Common.EWS: Autodiscover not available and mail cannot be sent. Reconfigure K2 server with valid Exchange settings."

Troubleshotting Steps

To resolve this issue, please ensure that the EWS connection strings are up to date.

- Please use the Connection String Editor (...\K2\Host Server\Bin\ConnectionStringEditor.exe) to verify if the values are mapped correctly.

Any change made to the connection strings would need to be followed by a K2 service restart for the change to take effect.