Turn on tracing: Follow below steps to enable E-mail router logging,
- Login to CRM E-mail Router server
- In Windows Explorer, locate the Microsoft.Crm.Tools.EmailAgent.xml file. By default, this file is located in the following folder: SystemDrive:\Program Files\Microsoft CRM Email\Service
- This is the configuration file for the Email router , Open the file by using Notepad or another text-editing program.
- In the file, examine the <SystemConfiguration> node, and then scroll down the text toward the end of the file to find the following statement: <LogLevel>1</LogLevel>By default, this value is set to 1. Modify this statement so that it reads as follows: <LogLevel>3</LogLevel>, If you want to save logs into text file, you can specify the log file location as <LogFile> c:\emailrouterlog.txt </LogFile> where you want it to put the log file. If you don’t mention log file location, all logs will be saved into windows event logs under MSCRMEmailLog. It is in this Event Viewer log view that the events appear.
- Save the file.
- Restart the E-mail Router Service.
When the LogLevel is set to 3 and a logfile location is specified, all router actions will be written to a log file in the specified location. If we don’t specify the log file location, all router actions will be logged in windows event logs. You will find a new Event Viewer log view that is named MSCRMEmailLog.
The router log will give you a lot of details, including granular detail on each incoming and outgoing email that it processes. Open the log file from the location specified, or open the windows event logs and review the captured error messages. You can find the problem with a specific email by searching the log file for the subject of the email.
Here is the sample Microsoft.Crm.Tools.EmailAgent.xml with logging options.
<?xml version="1.0" encoding="utf-8"?> <Configuration> <SystemConfiguration> <MaxThreads>50</MaxThreads> <MaxThreadExecution>600000</MaxThreadExecution> <SchedulingPeriod>1000</SchedulingPeriod> <ConfigRefreshPeriod>5000</ConfigRefreshPeriod> <ConfigUpdatePeriod>3600000</ConfigUpdatePeriod> <LogLevel>3</LogLevel> <LogFile> c:\emailrouterlog.txt </LogFile> <ProviderOverrides> <CacheCapacity>1024</CacheCapacity> <PendingStatusDelay>300000</PendingStatusDelay> <SendingStatusDelay>1800000</SendingStatusDelay> <MaximumDeliveryAttempts>10</MaximumDeliveryAttempts> <EWSRetrieveMessageCount>10</EWSRetrieveMessageCount> <BatchSize>5</BatchSize> <RequestBatchSize>5</RequestBatchSize> </ProviderOverrides> </SystemConfiguration> </Configuration>
Turn off tracing: While email router logs are helpful while troubleshooting an error with the router, they capture large volumes of detail while enabled, so I would suggest they should be turned off when you are done otherwise it causes disk space issues in the server if it is enabled for long time, seriously it caused us in QA when we forgot to turn off in QA.
What happens when you can’t open the Microsoft.Crm.Tools.EmailAgent.xml ? I get a access denied? Does something have to be disabled before you can access this file?
Dear Carolyn, Open a Notepad as Administrator. then Navigate to location where it is the XML file and open it. if you have the correct permission, you should be able to open it.
Thanks
as far as i know, you should be able to open this file. if not, please check if you are admin on that system.