Problems connecting to the email source

Email manager service throws errors related to connecting to the email source e.g. Outlook, M365, Google

Microsoft Outlook

The most common errors in the Email Manager service log for connectivity via Outlook are Folder ID errors. With Outlook, HelpMaster stores a local cache file in the ‘C:\ProgramData\PRD Software\HelpMaster’ folder named “MapiFolders_xxxxx.xml” where x is a number or the name of the Outlook profile. If any configuration changes are made to mailboxes from Exchange Server (M365 Hybrid or On-premise) or new mailboxes are added to the Outlook profile, the Folder ID of the mailboxes may change (or be missing from the cache file) causing a mismatch between the actual Outlook mailboxes and their saved Folder IDs stored in the cache file. In this case the cache file needs to be refreshed as follows;

  1. Log into HelpMaster as a full administrator and go to the Automation (ribbon) > Email Manager Profiles (option) and open any EM profile, but preferably the main log job profile

  2. Go to the Scan Folders step and click the Add button followed by the Reload mail boxes button and wait for the mailbox scan to complete

  3. Just click Cancel and Close now as the cache has now been updated

  4. If an email address/name is changed, or a new mailbox has been added then any Email Manager Profiles using these mailboxes/folders will need to be updated with the new names and locations, even if they appear the same, as follows;

    a) Open (or create) each affected Email Manager Profile, remove the old invalid scan folders and reselect the Scan Folders
    b) Reselect the Successfully Processed, and Unsuccessfully Processed folders for each profile also and save each one

  5. Disable Cached Mode, as having a local copy of the mailbox may lock the profile preventing access to it by the Email Manager service;

    a) From Outlook go to File (menu) > Account Settings v (drop-down) > Account Settings… (option) > Email (tab) and double click on the mailbox(es)
    b) Under Offline Settings untick (deselect) the Use Cached Exchange Mode to download email to an Outlook data file

    Disable Cached Mode

    c) Click Next> followed by Done and restart Outlook

Outlook with On-Premise Only (not Hybrid deployments of) Exchange Server

If the above steps don’t resolve the errors then it’s likely due to a quirk (or bug) in Outlook 2016 (Pro or M365 editions) and above. These versions have replaced standard Exchange on-premise connectivity with Microsoft 365 authentication dialogues by default. Currently the only way to revert newer Outlook versions to be able to connect to on-premise (only) Exchange servers is a registry hack, followed by recreating the Outlook profile, as follows;

  1. Open Registry Editor and browse to the following key HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Outlook\AutoDiscover if it exists

  2. If the full key path doesn’t exist, create new keys from HKEY_CURRENT_USER\Software\Policies\Microsoft to match the above full key path. e.g. Right click to create a “New Key” for Office, then 16.0 etc… until the full key path exists

  3. From the final key, Autodiscover, right click and create a new Dword (32bit) Value named ExcludeExplicitO365Endpoint

  4. Right click on the new value and select Modify then change the 0 value to 1 then exit the Registry Editor

    Outlook Registry Entry

  5. Delete all existing Outlook profiles and then re-launch Outlook. Select the option Manually configure Outlook and click Next

  6. Select the Exchange icon and continue as normal. Outlook will now connect to your on-premise Exchange server instead of prompting for a Microsoft account sign-in

If you keep multiple Outlook profiles and you switch back to an M365 connected profile at any time, the registry hack above will no longer be honored until a reboot is performed. This will be apparent when switching back to the on-premise Exchange profile, as the Microsoft 365 account authentication dialogue will pop up again and the Email Manager service will start failing with the same folder ID errors as before.

Outlook with Hybrid deployments of Exchange Server

Hybrid deployments of Exchange on-premise that are Azure AD synchronized with Microsoft 365 should still function with Outlook and Email Manager using an M365 connection. However with Outlook via IMAP connections to M365, only the HelpMaster Email Manager for IMAP application interface will function correctly, the Email Manager background service will fail in this instance too, due to impersonation authentication failure. Do the following to run the HelpMaster Email Manager for IMAP application;

  1. Open the Services console and stop the Email Manager service

  2. Launch the HelpMaster Email Manager for IMAP application from the Windows Start menu under HelpMaster xx.xx.xx

  3. Click the Start button

    Email manager for IMAP

OAuth 2.0 support for POP, IMAP, and SMTP AUTH connectivity is also possible, but the preferred solution is to upgrade to HelpMaster to v22 or above and configure direct integration to M365 as outlined here. Configuration is very similar for the two solutions but direct integration will be more reliable.

See Also

The Email Manager service will not start

Jobs are not being logged

Actions are not being added to existing HelpMaster jobs

Jobs are being logged for the wrong person!

Failed test for database access

Failed test for working folders access

Microsoft 365 Exchange Online Basic Authentication Deprecation

Basic Authentication Deprecation September 2022 Update