E-mail Service Error

Today I ran across an issue associated with the CRM E-mail service.  The below error was written to the Event Logs every 30 minutes.  The only reference I could find for the error was an issue with the E-mail Router that was addressed in Update Rollup 1.  Since the CRM server had Update Rollup 3, I continued researching the issue.  I checked the E-mail Router Configuration Manager to see if there were any issues with the Router Service.  I confirmed that all mailboxes tested with successful access and the router service was running as expected. 

Since the e-mail router service appeared to be running as expected, I decided to check the CRM application to see if all e-mails were sending as expected.  I opened Advanced Find and selected the E-mail Messages from the Look For drop down list, selected Status Reason as my filter criteria and added Pending Send, Sending, and Failed as the Status Reasons.  After running the query, one e-mail record was returned.  I opened the e-mail and found that the e-mail was in Sending status.  I also discovered that the second line in the e-mail body contained the following:

"Execute Test 3 MKAìfLÀuŒrØØ„5 ‘K’ is not a valid integer value". This is not an error message generated by code in our software"

As you can see, there are a number of special characters contained in the above, which was causing the error and correlated to error logged on the server, "There is an error in XML document (2, -26). —> System.Xml.XmlException: ‘’, hexadecimal value 0x05, is an invalid character. Line 2, position -26."

I removed the e-mail from the CRM system and the error was resolved.  Long story short, if you encounter e-mail errors, check the body and subject of the e-mails to see if either contains any special characters.  If so, remove the special characters and try sending the e-mail again.

Event Type: Error
Event Source: MSCRMEmail
Event Category: None
Event ID: 0
Date:  7/10/2009
Time:  7:00:27 AM
User:  N/A
Computer: CRM1
Description:
#61346 – An error occurred while checking for outgoing e-mail messages to process for SMTP:
http://crm1/VisionAIRInc. System.InvalidOperationException: There is an error in XML document (2, -26). —> System.Xml.XmlException: ‘’, hexadecimal value 0x05, is an invalid character. Line 2, position -26.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
   at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.ParseText()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.ReadElementString()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read171_email(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read281_BusinessEntity(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read300_BusinessEntityCollection(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read1514_BackgroundSendEmailResponse(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read1526_Response(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCrmService.Read1541_ExecuteResponse()
   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer13.Deserialize(XmlSerializationReader reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   — End of inner exception stack trace —
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   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.CrmPollingSendEmailProvider.RequestEmailsToProcess(QueryExpression query)
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessageInternal()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessage()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s