There are many times the following errors can be seen in verbose E-mail Router logs or in the Event Viewer of the E-mail Router machine:

 

#14494 - A provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider has been aborted because it has been running for longer than the allowed execution time. .

#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.Threading.ThreadAbortException:

#26090 - An error occurred while opening mailbox Microsoft.Crm.Tools.Email.Providers.EmailException

 

The most common steps to resolve these errors are below:

 

1. Increase the MaxThreadExecution value in the EmailAgent.xml file located in the following directory: C:\Program Files\Microsoft CRM Email\Service

Increase this value to 1200000 as shown below. This is the maximum time interval a thread can execute for.

<MaxThreadExecution>1200000</MaxThreadExecution>  

 

2. In E-mail Router Configuration Manager, open the outgoing and incoming Configuration Profiles and change the Max Messages per cycle to 250 and increase the Polling Period to 120.

 

3. Finally, navigate back to C:\Program Files\Microsoft CRM Email\Service

 

4. Open the Microsoft.Crm.Tools.Email.Management.config

 

5. Add the following within the Configuration tags

 

<system.net>

<connectionManagement>

 <add address="*" maxconnection = "24" />

</connectionManagement>

</system.net>

 

<system.web>

<httpRuntime executionTimeout="900"/>

</system.web>

 

6. Next, open the Microsoft.Crm.Tools.EmailAgent.exe.config in the same location. If it does not exist, create it 5.Then, replace the contents of this file with the following:

 

<configuration>

 

<system.net>

<connectionManagement>

<add address="*" maxconnection = "24" />

</connectionManagement>

</system.net>

 

<system.web>

<httpRuntime executionTimeout="900"/>

</system.web>

 

</configuration>