Thursday, 28 July 2016

Task Notification email not working in K2

Hi There,
Developers quite often face Email configuration issue while working with K2 workflow. Mail works fine if you send it using Email event. But task notification email wont be received and if you look at the error profile got nothing available there.
K2 email event always use the exchange web services to connect the Exchange server for sending emails. But the client events use SMTP call to send the task notification email. So if your SMTP configuration is wrong then task notification mails will not work. All these configurations are stored in the K2 database. To edit and view these configuration details you need to query K2 database which is not recommended, to make it simple and flexible there is an exe file available in the K2 community download it and install it on the K2 server.
Steps to install K2 connection string editor:
1) Download the file from K2 community on the link provided below.
2) Place the exe file inside the Bin folder of Hostserver
\K2 blackpearl\Host Server\Bin
3) Run the exe file.
a window should open with Exchange Service and SMTP Server configuration details. If SMTP details is not available. Click on the add buttn, and select “SourceCode.Net.Mail.SmtpConnection”, provide the email address which should be appeared in the From Address of the Task Notification emails. Normally use K2 service Account.
Then in the Right side of the window.
Set Authentication, HostName (SMTP server name/IP address), Password, Port (25), TLS (This is used while connecting to Host- set it to None) and then provide the User ID.
After this save the information and close the exe file. Restart the K2 service and test.