Send Email to KanBo - Installation (Cloud)
The Send Email to KanBo 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.
- 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.
- You should 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: email@example.com)
1. Creating a Catch-All email address.
You will need to create a Catch-All email account in your Exchange Online.
- Create a new account for the Catch-All purpose only in Office 365 Admin Center. Give this account the Exchange Online license. Read more here about assigning Office 365 licenses to users here.
- 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. Enabling Incoming Mails in the KanBo web.config
- Go to Your KanBo Web.config and set "KanBoIncomingMail" 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. Azure AD permissions
You need to make sure that all the required permissions are present in Azure AD. Go to Azure AD and find Your KanBo App registration.
Go to API Permissions and select Add a permission.
Select Microsoft Graph.
Select Delegate and the following permisisons.
- OpenID permissions - Email
- Mail - Mail.Read and Mail.ReadWrite
Save it. Follow the process, this time select Application permissions.
Here add Mail - Mail.Read and Mail.ReadWrite
Once added, grant Admin's consent.
5. Configure the Email Tool
Contact us at firstname.lastname@example.org to receive the KanBo Console Job Host Runner Package.
- Once you download the package, unzip it and move it a chosen location.
- Open your directory and start editing KanBo.ConsoleJobHostRunner.exe.config
You should have also received a package with additional configuration files. Please change the contents of this configuration files with the contents of the configuration file for Incoming Mails.
After doing that, please change the following values:
- YourCatchAllEmail@domain.com - add here your Catch-All email
- Password - add here the Catch-All account's email
- In the next section, adjust the following values:
<package name="auth-aad" client-id="FILL-ME" tenant="FILL-ME" thumbprint="FILL-ME"/>
<package name="webjob.incoming-mails" thumbprint="FILL-ME" kanbo-url="https://FILL-ME" catch-all-mail="FILL-ME@FILL-ME" incoming-mail-domain="FILL-ME"/>
- ConnectionString - the connection string to the database from Your web.config,
- package name="auth-aad" - copy the same values that are present in the web.config of Your kanBo,
- package name="webjob.incoming-mails" - use the same thumbprint from the auth-aad package, type in the url of Your KanBo (with https://), for the catch-all-mail type in the email address of the service account, and in incoming-mail-domain type in the domain that the service account uses
Save the changes.
6. Add an Azure App Webjob
- Pack the EmailToKanBo folder in a .zip file (the package you were working on in the previous steps).
- Go to your Azure App -> Webjobs. Select +Add.
Name: yuour custom name
File upload: the .zip of EmailToKanBo package, already configured,
CRON Expression: choose the convenient time for you, for information regarding CRON on Azure, see this guide.
7. Use it!
You finished the configuration and installation of the Incoming Mails feature.
Now read how to use this feature by reading an article here: Incoming Emails
Recommendation: Set an Outlook retention policy to remove old messages
In order to not allow your Incoming Mails mailbox to clog up, set a simple rule to clean messages older than a week.
1. As Exchange Administrator, got to Exchange Admin Center -> Compliance Management -> Retention Tags. Create a new rule "applied automatically to a default folder.
2. Find out a name, select this tag to apply to Inbox only and choose retention period to 90 days.
3. Go to retention policies and create a new Retention policy with this retention tag assigned.
4. Go to recipients, select your Incoming Mails account and then in Mailbox features select your newly created Retention Policy.