Enable Tracing in CRM E-mail Router
In a case where you think you have done the right setup for CRM incoming and outgoing email, yet something isn’t working as expected (e.g. email not sent or tracked correctly), then you might need to enable tracing on the CRM E-mail Router.
This Microsoft Support article describes how to enable tracing in Microsoft Dynamics CRM. Scroll down and look for Microsoft Dynamics CRM E-mail Router.
http://support.microsoft.com/kb/907490
I suggest un-comment the line “C:\Temp\CRMEmail.log” to log to a file rather than to the events log.
Once enabled, you’ll see very verbose messages, such as:
01/23/2012 15:45:17 : #26090 - An error occurred while opening mailbox email@domain.com. System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 66.111.165.61:110 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP) at System.Net.Sockets.TcpClient.Connect(IPAddress address, Int32 port) at Microsoft.Crm.Tools.Email.Providers.Pop3Client.Connect(Boolean useSsl) at Microsoft.Crm.Tools.Email.Providers.Pop3PollingMailboxProvider.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
- which turns out that the incoming email configuration was incorrect. And then below,
01/23/2012 16:45:18 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. 01/23/2012 16:45:18 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. 01/23/2012 16:45:19 : #21381 - Opening mailbox email@domain.com. 01/23/2012 16:45:19 : #65508 - Exchange Server not found in dictionary, calling exchange autodiscover. 01/23/2012 16:45:19 : #31826 - Refreshing configuration settings. 01/23/2012 16:45:19 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. 01/23/2012 16:45:19 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. 01/23/2012 16:45:19 : #62269 - Checking for outgoing e-mail messages to process for SMTP: http://crmserver/orgname. 01/23/2012 16:45:20 : #29426 - There are no e-mail messages to process in mailbox SMTP: http://crmserver/orgname. 01/23/2012 16:45:20 : #60687 - The thread that is processing mailbox SMTP: http://crmserver/orgname is shutting down as requested. 01/23/2012 16:45:20 : #31826 - Refreshing configuration settings. 01/23/2012 16:45:21 : #31826 - Refreshing configuration settings. 01/23/2012 16:45:22 : #31826 - Refreshing configuration settings. 01/23/2012 16:45:23 : #31826 - Refreshing configuration settings. 01/23/2012 16:45:24 : #26090 - An error occurred while opening mailbox email@domain.com. Microsoft.Crm.Tools.Email.Providers.EmailException: No results were found. at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.IsCurrentUser() at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.GetService() at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector() at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run() 01/23/2012 16:45:24 : #19780 - Closing mailbox email@domain.com. 01/23/2012 16:45:24 : #31826 - Refreshing configuration settings.
- which according to another Microsoft Support article, is because the mailbox is hidden from the Exchange address lists.