Enabling KanBo Email Notifications (On-Premises)

Table of Contents

Only unread notifications are sent via email. Each user can turn them on or off individually and specify the sending interval. Read more about notification settings.

Prerequisites

  • The machine on which you can deploy the Email Notifications component.
  • A special service account with an Exchange or Exchange Online license can be used to send emails.
  • The Virtual Machine address needs to be connected to the KanBo Database. To do so, the server firewall needs to be unlocked.

To receive the most recent KanBo installation package, contact us at support@kanboapp.com.

1. Preparing the email notifications package

Extract the KanBo.JobHost.zip file to the location you want. The location could be a folder named “Email Notifications.” For example: C:\inetpub\Email Notifications.


2. Updating the appsettings.json file with your parameters

  1. Copy the connection string from the KanBo appsettings.json file and paste it into the appsettings.json file for the Email Notifications job.

"ConnectionStrings": {
  "KanBo": "CONNECTIONSTRING"
 },

  1. Configure the Plugins section. In the first part, you can configure:

   {
    "type": "job.email-notifications",
    "name": "mail",
    "link": "{https://Your KanBo Address.domain}",
    "title": "myname",
    "template": "template.html",
    "limit": 100,
    "repeat": "10s",
    "children": [
     [
      "sender",
      {
       "email": "{sender@YOURDOMAIN.COM}",
       "type": "SmtpClient"
      },
      {
       "type": "smtpclient",
       "deliverymethod": "Network",
       "username": "{sender@YOURDOMAIN.COM}",
       "password": "{PASSWORD}",
       "enablessl": true,
       "host": "{mail.YOUR_DOMAIN.COM}",
       "port": 587,
       "pickupdirectorylocation": "{YourKanBoDirectory}"
      }
     ]
    ]
   }

  1. Configure the second part of Plugins section.

Change the following values:

  • "{https://YourKanBoAddress}" - your KanBo address,
  • "myname" - choose a title, i.e. KanBo,
  • "{sender@YOURDOMAIN.com}" - sender email and username - the email account from which emails will be sent,
  • "{PASSWORD}" - this email account password,
  • "{mail.YOUR_DOMAIN.COM}" - your email hosting address, for Office 365 installations, it can be smtp.office365.com,
  • Your KanBo path in your KanBo Directory value.

a) With SSL:

   {
    "type": "job.email-notifications",
    "name": "mail",
    "link": "{https://Your KanBo Address.domain}",
    "title": "myname",
    "template": "template.html",
    "limit": 100,
    "repeat": "10s",
    "children": [
     [
      "sender",
      {
       "email": "{sender@YOURDOMAIN.COM}",
       "type": "SmtpClient"
      },
      {
       "type": "smtpclient",
       "deliverymethod": "Network",
       "username": "{sender@YOURDOMAIN.COM}",
       "password": "{PASSWORD}",
       "enablessl": true,
       "host": "{mail.YOUR_DOMAIN.COM}",
       "port": 587,
       "pickupdirectorylocation": "{YourKanBoDirectory}"
      }
     ]
    ]
   }

b) Without SSL:

  {
    "type": "job.email-notifications",
    "name": "mail",
    "link": "{https://Your KanBo Address.domain}",
    "title": "myname",
    "template": "template.html",
    "limit": 100,
    "repeat": "10s",
    "children": [
     [
      "sender",
      {
       "email": "{sender@YOURDOMAIN.COM}",
       "type": "SmtpClient"
      },
      {
       "type": "smtpclient",
       "deliverymethod": "Network",
       "username": "{sender@YOURDOMAIN.COM}",
       "password": "{PASSWORD}",
       "host": "{mail.YOUR_DOMAIN.COM}",
       "port": 587,
       "pickupdirectorylocation": "{YourKanBoDirectory}"
      }
     ]
    ]
   }


3. Creating a task in the Task Scheduler (on-premises)

Here is a simple example of how to add a KanBo notification task to Windows Task Scheduler. You can find the full manual for Windows Scheduled Tasks on the Microsoft website.

  1. Open Task Scheduler. Type a name and select a user with the proper privileges to execute the task. We also recommend selecting Run with highest privileges.

  1. If the connection string to the KanBo database is Integrated Security=True, ensure that the user has read/write permissions to the database. Select the Triggers tab, create a new trigger, and use the following configuration:
  • Begin the task: "On a schedule"
  • Settings: "Daily"
  • Advanced settings: Repeat task every "15 minutes" for a duration of "Indefinitely"
  • Stop task if it runs longer than "30 minutes"
  • Select "Enabled"

  1. Select Actions tab and add new action pointing to the "KanBo.JobHost.exe" file within the folder where you unpacked the "KanBo.JobHost.zip" file.
  2. After this action is completed, select OK and confirm your administrator credentials.
  3. Enter your email notifications package location in the Start In field.

Example: C:\inetpub\Email Notifications\KanBo.EmailNotifications


Recommendation: Set an Outlook retention policy to remove old messages

To avoid clogging up your email notifications mailbox, set a simple rule to clean out messages older than a week.

  1. As an Exchange administrator, go to the Exchange Admin Center > Compliance Management > Retention Tags. Create a new rule that is applied automatically to a default folder.

  1. Find a name and select this tag to apply it to the "Sent Items" folder only. Then, choose a retention period of seven days.

  1. Go to Retention policies and create a new retention policy to which this tag has been assigned.

  1. Go to Recipients, select your Email Notifications account, and then in Mailbox features, select your newly created Retention Policy.



Troubleshooting

Something bad happened with AddtoGroup

These notifications are very old and not compatible with the new version of KanBo that your organization now has. Since email notifications were recently enabled, these old notifications are being sent to people who haven't used KanBo before. There is a solution to fix this issue.

  1. Open the Content Database of KanBo in SQL Manager.
  2. Execute the following script on this database:
  3. UPDATE NotificationUsers SET WasMailed = 1

It will reset all MailNotification counters to zero, so you should no longer receive any error messages regarding email notifications.

Was this article helpful?

Please, contact us if you have any additional questions.