Tuesday, February 9, 2010

The length of the 'messageid' attribute of the 'email' entity exceeded the maximum allowed length of '100'

I was receiving this error often at the Event Viewer > Application Log of the CRM Server.

#9628 – An error occurred while delivering the e-mail message with subject "This is a second demo" in mailbox crmdemo@gmail.com for delivery to http://192.168.1.205:5555/crmdemo.System.Web.Services.Protocols.SoapException: Server was unable to process request.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.Crm.Sdk.Proxy.CrmService.Execute(Request Request)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.Pop3PollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessage(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()\r\n
0x80044331
A validation error occurred. The length of the 'messageid' attribute of the 'email' entity exceeded the maximum allowed length of '100'.

Resolution:
Tweak the Message ID attributes Maximum Length from 100 - 200 or 250 and you are good to go.
Procedure:
  1. Settings > Customizations > Customize Entities > Email > Attributes
  2. Double click Message ID and change the Maximum Length
  3. Save and Close
  4. Publish

E-mail Sending Failed - Dynamics CRM 4.0 E-mail Router

Recently I had a chance to date with the E-mail Router for Microsoft Dynamics CRM 4.0. I did not have an Exchange Server setup so I tried with the POP3 e-mail settings. Though it was straight forward and easy to configure the E-mail Router, I had some trouble sending an e-mail from CRM.

By the way, I am using Google Mail (Gmail) POP3 service to configure my environment.

I received the below error
#61042 - An error occurred while processing the outgoing e-mail
message with subject "xyz" for SMTP: http://localhost:5555/organizationName for
delivery through smtp.gmail.com. System.Net.Mail.SmtpException: The operation
has timed out.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at
Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.ProcessMessageInternal(email
emailMessage)
at
Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.ProcessMessage(email
emailMessage)
at
Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()


After trying things like re-configure E-mail Router, Gmail POP3 settings, E-mail Router service restart etc. something dawn'd on me.

I noticed that Gmail had provided with 2 port numbers, SSL (Secure Sockets Layer) and it's successor TLS (Transport Layer Security). I replaced the SSL port number with the TLS (ie 465 with 587) in the E-mail Router Outgoing Configuration Settings under the Advanced tab.

Result: The E-mail moved on and so did I. Happy e-mailing!!