When the Microsoft Dynamics CRM Email Router Service fails, it will not be possible to send or receive emails in CRM. The cause of the service failure is a corrupt .xml file named Microsoft.Crm.Tools.EmailAgent.SystemState.xml. Deleting the file and restarting the email router service will resolve the problem. A new .xml file is created when the service has been restarted.
The Event Viewer Application log will have errors containing the following information:
Log Name:Application
Source: MSCRMEmail
Event ID: 0
#16192 – The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: The E-mail router service cannot access system state file Microsoft.Crm.Tools.EmailAgent.SystemState.xml. The file may be missing or may not be accessible. The E-mail Router service cannot continue and will now shut down. —> System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader..ctor(String filePath, ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Providers.SystemState.Initialize(ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
— End of inner exception stack trace —
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()
The problem is easy to fix, just follow these steps:
- Open Windows Explorer and show Hidden Files and Folders.
- Locate the folder C:\Program Files\Microsoft CRM Email\Service.
- Delete the Microsoft.Crm.Tools.EmailAgent.SystemState.xml file.
- Open Services console and restart the Microsoft Dynamics CRM E-mail Router Service.
See Microsoft KB article 954522 for more details.
According to Microsoft this problem has been addressed in Dynamics CRM 4.0 Update Rollup 13 and Dynamics CRM 2011. Click here for more information.

