Table of Contents

Mail Logging

Introducing the Mail Logging Module: Effortlessly connect Business Central to Exchange Online and streamline email management. Import emails directly into BC, and automatically archive them in the DocBox, associating them with the correct documents.

General Information

The Mail Logging Module supports BC OnPrem and BC Online (SaaS) environments.

Important

The Mail Logging Module is only compatible with Exchange Online.

Prerequisites:

Before you can enable the Mail Logging in BC, there are some manual installation steps needed. Please follow the guide here to create a shared mailbox: Link

Register Azure AD Application

Please follow the instructions to register an application in Azure AD:

The following steps assume that you use Microsoft Entra ID to manage identities and access. For more information, see Quickstart: Register an application with the Microsoft identity platform.

  1. Register a new application for the Mail Logging in your Entra ID.
Important

Choose the Option Accounts in any organizational directory (Any Azure AD directory - Multitenant) as Supported Account Types.

  1. In the Azure Portal, under Manage, choose Authentication. Under Redirect URL, add the redirect URL that is suggested on the DocBox Setup page in Business Central.
Note

If you do not specify the redirect URL, you can do so later by choosing Add a platform, and then choosing Web to add the web application and the redirect URL.

  1. Under Manage, choose API permissions, and choose Microsoft Graph, and then choose Delegated permissions.
  2. Use the search box to find and select Mail, and then add the Mail.ReadWrite.Shared permission.
  3. Under Manage, choose Certificates & Secrets, and then create a new secret for your app. You'll use the secret in the Client Secret field on the DocBox Setup page in Business Central.
  4. Choose Overview, and then find the Application (client) ID value. This is the client ID of your application. You must enter it in the Client ID field on the DocBox Setup page.

More information can be found here: Link

To setup Mail Logging in DocBox

  1. Choose the Search icon, enter doc.box Setup, and then choose the related link.
  2. Choose the Tab Mail Logging
  3. Enter a valid E-Mail in the Shared Mailbox Email field. This E-Mail should be the E-Mail of the shared mailbox that was created in the Prerequisites Section.
  4. Enter the Client ID and Client Secret that was created in the Prerequisites Section.
  5. Enable the module by activating the field Enabled
Note

The system will automatically create a job queue that import mails from the shared mailbox every 10 Minutes. For testing purposes there is also an action available called Import Mails.