E-mail logging and The call to member Logon failed. Collaboration Data Objects returned following message: [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]

In 90% of the E-mail logging errors I personally dealt with, the logon error is the most common error being filed by partner followed by The call to member Sender Failed. Collaboration Data Objects returned the following message: Collaboration Data Objects E_ACCESSDENIED(80070005). Both errors are annoying and a bit complicated to explain why this could occur.

Let's assume for one minute yo have followed the following article:

942793 How to set up e-mail logging in Microsoft Dynamics NAV 5.0
https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;EN-US;942793

The article indicates the E-mail logging should work by now. Fact is that the E-mail logging will probably not work and the above mentioned errors are logged. What did you do wrong? The answer is: "Nothing". Some more steps needs to be taken. Let me first describe what we need for the setup of E-mail logging.

1. We need an Exchange 2003 or Exchange 2007 environment
2. We need a dedicated NAS PC / Server with Outlook and Dynamics NAV client installed

 IMPORTANT NOTE:
The NAS server with Outlook installed cannot be the Exchange Server computer:
266418 Microsoft does not support installing Exchange Server components and Outlook on the same computer
https://support.microsoft.com/default.aspx?scid=kb;EN-US;266418

3. We need a client PC plus Outlook
4. We need a dedicated user account (let's call this account "e-mail logger") that is a SUPER user in NAV and local Admin on the NAS server / PC
5. We need a user account for testing the E-mail logging
6. We need the Outlook Security Settings form that ships with the ORK 2003

IMPORTANT NOTE:
If using Exchagne 2007, please do see the following blog I wrote earlier:
https://blogs.msdn.com/nav_developer/archive/2008/05/09/e-mail-logging-when-using-outlook-2007.aspx

To avoid the MAPI_E_LOGON_FAILED error mesage, please do the followiung:
- log on to the server or PC running NAS "using the "e-mail logger" user account 
- configure the NAS MMC with the required properties, MAILLOG in NAV 4.0 and earlier releases and JOBQUEUE in NAV 5.0 and later releases
- make sure the NAS service is configured with the "e-mail logger" user account via services.msc
- create an Outlook profile for the "e-mail logger" user account => delete all other existing Outlook profiles
- create two Public Folders for Storage and Queue

IMPORTANT NOTE:
Creating the two folders while being logged on as the "e-mail logger user" account means that the two folders have the "e-mail logger" user account as the owner. If the "e-mail logger" user account does not have permissions to create Public Folders, then have the Exchange Admin do this and have him manually add the "e-mail logger" user account as the orignal owner via Client Permissions within the properties of the Public Folders

- start up Dynamics NAV client and configure the E-mail logging properties in Marketing Setup

In general circustances, this will prevent the MAPI_E_LOGON_FAILED error messages. The NAS has direct access to the Outook Profile via the "e-mail logger" user account and the folder permissions are set OK. As the Dynamics NAV client runs on a different machien, just leave the NAS and the Outlook client running on the dedicated box.

Most partners now get the other error message: The call to member Sender Failed. Collaboration Data Objects returned the following message: Collaboration Data Objects E_ACCESSDENIED(80070005). I will probably dedicate another full blog on that topic, but in general this can be caused by missing or ignored Outlook Security Settings form and / or Exchange Server allowing messages to come in without Sender. NAS cannot handle those message and will log the permissions error. The process will halt after that and the Queue folder will be filled with messages if an automatic way of filling the queue folder was selected.

Also see this blog:
https://blogs.msdn.com/nav_developer/archive/2008/05/09/e-mail-logging-when-using-outlook-2007.aspx