Enabling Sending Emails to KanBo (On-Premises)

Table of Contents

Overview

The Send Email to KanBo feature allows you to send emails directly to a space and create a new card from the email. It is also possible to send an email and its attachments to an existing card.

For more information, see the article about sending emails to cards and spaces.

 Prerequisites

  • Functionality requires having a service account on your Exchange to serve as a catch-all account. This user needs to have an Exchange license.
  • You need to set up an email account with a custom domain for Incoming Email. Create an email address with this domain (for example, mail@yourdomain.com). You can use either a subdomain or a fully qualified domain.

Installation

1. Creating a catch-all email address

You will need to create a catch-all email account on Exchange server.

  • Read how create a catch-all email address here.
  • Read more about catch-all address and how to create it on Exchange here.
  • Create a new account for the catch-all purpose. Make sure this account has the Exchange license and mailbox.
  • Add the custom domain to accepted domains.

2. Creating an SSL certificate

This is the recommended method for the IIS scenario. Perform these steps on your virtual machine.
  1. Go to the IIS and double-click on Server Certificates.
  1. Select Create Self-Signed Certificate.
  1. Specify a name for the certificate, and select Personal. Select OK.
  1. Select the certificate, and then from Actions select Export.
  1. Choose the path and name the certificate. Then, add a new password.


3. Changing KanBo appsettings.json file

  1. Go to the location where your KanBo backend is hosted (the KanBo package). Open the appsettings.json file in any text editor.
  2. Add the following code to the "Plugins" section and change the path to the certificate.
{
    "type": "auth.app",
    "issuer": "incoming-mails",
    "children": [
     {
      "type": "signature",
      "algo": "rs256",
      "children": [
       [
        "cert",
        {
         "type": "x509-file",
         "file": "C:\\Certs\\mails\\somecert.cer"
        }
       ]
      ]
     },
     [
      "mapper",
      {
       "type": "service",
       "name": "incoming emails",
       "roles": "service"
      }
     ],
     [
      "mapper",
      {
       "type": "user"
      }
     ],
     [
      "mapper",
      {
       "type": "email",
       "roles": "service"
      }
     ],
     [
      "mapper",
      {
       "type": "login"
      }
     ]
    ]
   },
  1. Set KanBoIncomingMail value to true.

"IncomingMail": true,

  1. Set KanBoIncomingMailDomain to your sending domain name (the one that has the catch-all mailbox).

"IncomingMailDomain": "YourDomain",

  1. Save the appsettings.json file.

If you plan to send emails to your catch-all address and other addresses, add this entry and adjust the number inside to match the maximum number of recipients.

<add key="kanbo.max-receivers" value="1" />


4. Configuring the Email Tool

  1. If you do not have the KanBo.JobHost.zip package, contact us at support@kanboapp.com to receive it.
  2. Once you have downloaded the package, unzip it and move it to a location of your choice. In our case, it would be: C:\Email Tool\EmailToKanBo\EmailToKanBo.
  3. Open your directory and begin editing the appsettings.json file.
  4. Modify the values in the lines below:
    • "YourCatchAllEmail@domain.com" > add here your catch-all email address,
    • "Password" > add here the catch-all account's email
    • "mail.url" > server address of your Exchange instance
<add key="mail.type" value="ews-unread" />
<add key="mail.receiver-email" value="YourCatchAllEmail@domain.com"/>
<add key="mail.receiver-password" value="Password"/>
<!-- will autodiscover if empty -->
<add key="mail.url" value="https://some-host-address"/>


  1. In the next section, adjust the following values:
    • CertPath - local path to your certificate,
    • "Password" > your certificate password,
    • "https://YourKanboAddress" > add here your KanBo address
    • "YourDomain" > enter the email domain that is associated with the catch-all address here

<add key="kanbo.api.cert.file" value="CerthPath\CertName.pfx"/>
<add key="kanbo.api.cert.pass" value="Password"/>
<add key="kanbo.api.url" value="https://YourKanBoAddress"/>
<add key="kanbo.incoming-mail-domain" value="YourDomain"/>
  1. Save the changes.



5. Adding a task to the Task Scheduler

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

  1. Open Task Scheduler. Insert data in the following values:
    • Name,
    • Select user with proper privileges to execute task,
    • Select Run whether user is logged on or not,
    • We also recommend to select Run with highest priviledges.

  1. Select Triggers tab, and then create a new trigger. Complete the following steps:
    • Begin the task > On a Schedule
    • Settings > Daily
    • Advanced settings: Repeat task every "5 minutes" for a duration of "Indefinitely" (you can choose another time period that suits your needs.)
    • Select Enabled

  1. Select Actions tab and add new action pointing to the EmailToKanBo.Webjob.exe file within the folder where you unpacked the Email To KanBo tool.
    • Action > Start a program,
    • Program/script > local path to EmailToKanBo.Webjob.exe file (example: C:\Email Tool\EmailToKanBo\EmailToKanBo\EmailToKanBo.Webjob.exe)
    • Start in (optional) > add a local path to the folder where EmailToKanBo.Webjob.exe is located (example: C:\Email Tool\EmailToKanBo\EmailToKanBo\)
  2. Select OK and confirm your administrator credentials.


You have finished configuring and installing the Incoming Mails feature.

Recommendation: Set an Outlook retention policy to remove old messages.

Was this article helpful?

Please, contact us if you have any additional questions.