Incoming Emails Installation in KanBo 2.7

The Incoming Emails feature will allow you to send emails directly to a KanBo Board and create a new Card out of the email. It will also allow you to add email and its attachments to an existing KanBo Card.


Prerequisites

  • This feature is enabled for KanBo in version 2.7. Make sure you have this KanBo version installed.
  • Functionality requires having a service account on your Office 365 to serve as a Catch-All account. This Office 365 user needs to have at least Exchange Online license.
  • Optional - you can set up an email account for Incoming Email with a custom domain. Learn how to add a custom domain to your Office 365 here: Add a domain to Office 365. When you wish to proceed with a custom domain, create a service account with this domain in his email address (example: mails@yourdomain.com)



1. Creating a Catch-All email address.


You will need to create a Catch-All email account in your Exchange Online (in Office 365 installation scenario) or on Exchange server (in On Premise installation scenario).



This is a recommended scenario for creating a Catch-All address for Office 365/Exchange Online.



  • Add accepted domain in your Office 365.

Go to Office 365 and select Admin -> Exchange. As a next step, please choose the Email Flow in Exchange Admin Center.





  • Click on the  “Accepted Domains”, then select your domain and click on the edit button.



  • In the new windows, change  “Authoritative” to “Internal Relay” and save the changes.




  • Open Mail Flow section once again. Now select the Rules section and click on + (Add New button) and chose Create New Rule.



  • When the rule appears, select "More options..." at the bottom of the page. Give this Rule a name like "CatchAll".



  • Set the following properties to the Rule.
- In Apply this rule if chose "A recipient's domain is" - here add your domain.
- In Do the following chose "Redirect the message to" and then, chose your CatchAll Email account from the User Picker.
- In Do the following Add Action and select "Set the message header to this value..." and "Set the message header 'X-CatchAll-Rule' to value 'Yes'.
- In Except if... select "The recipient is..." and then, chose your CatchAll Email account from the User Picker.

Now save the Rule.



2. Creating a SSL certificate.


This is a recommended method for the IIS scenario. Please perform these steps on your Virtual Machine.


  • Go to the IIS and double click on Server Certificates.


  • Now click on Create Self-Signed Certificate.



  • Specify a friendly name for a certificate and select Personal. Click on OK.

  • Select the certificate and select Export.



  • Select the path and name for the certificate and add new password to it.


3. Changing KanBo web.config.

  • Move to the location where your KanBo backend is hosted (the KanBo package). Open the web.config in any text editor.



  • Add the following code into <Authentication> section. 


Change the CertificatePath to your local path to the certificate,

CertName with your certificate's name

and Password with your certificate's password.

<provider id="incoming-mails-svc" type="AppSignedService" name="Incoming mails">
<signer type="X509SignerFromFile" file="CertificatePath\CertName.pfx" key="Password" />
</provider>
<provider id="incoming-mails-user" type="AppSignedUser">
<signer type="X509SignerFromFile" file="CertificatePath\CertName.pfx" key="Password" />
</provider>
<provider id="incoming-mails-email" type="AppSignedEmail">
<signer type="X509SignerFromFile" file="CertificatePath\CertName.pfx" key="Password" />
</provider>




  • Move slightly to the bottom to see the <appSettings> section.

- Set KanBoIncomingMail value to true.


<add key="KanBoIncomingMail" value="true" />


- Set KanBoIncomingMailDomain to your sending domain name - the one on which you have the Catch-All mailbox.


<add key="KanBoIncomingMailDomain" value="YourDomain" />

Save the web.config.





4. Configure the Email Tool

Contact us at support@kanbozone.com to receive an Email to KanBo tool package. 


  • Once you download the package, unzip it and move it a chosen location. In our case it would be C:\Email Tool\EmailToKanBo\EmailToKanBo .
  • Open your directory and start editing EmailToKanBo.exe.config




  • In the following section please change the following values:
- YourCatchAllEmail@domain.com - add here your Catch All email

- Password - add here the Catch-All account's email

<add key="mail.type" value="ews-unread"></add>
<add key="mail.receiver-email" value="YourCatchAllEmail@domain.com"></add>
<add key="mail.receiver-password" value="Password"></add>
<!-- will autodiscover if empty -->
<add key="mail.url" value="https://outlook.office365.com/EWS/Exchange.asmx"></add> 
    



   

  • 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 - add here your email domain to which Catch-All address is connected to


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



5. Add a task to the Task Scheduler.

Here is the simple example how to add Email to KanBo Task to the Windows Task Scheduler. 

Full manual for Windows Scheduled Tasks you can find in the Microsoft web site: https://technet.microsoft.com/en-us/library/cc766428.aspx


  • Execute 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.



  • Select Triggers tab and create a new trigger. Complete the steps as it follows:

- Begin the task - On a Schedule
- Settings: Daily
- Advanced settings: Repeat task every 5 minutes for a duration of Indefinitely (you can of course chose another period of time to suit your needs)
- Select Enabled



  •  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\)


After this action is completed, select OK and confirm your administrator credentials.



6. Use it!

You finished configuration and installation of the Incoming Mails feature.

Now read how to use this feature by reading an article here: Incoming Emails

This article was helpful for 1 person. Is this article helpful for you?