none
EmailMessage.Bind Error "Unexpected end of file has occurred. The following elements are not closed: t:MimeContent, t:Message" RRS feed

  • Question

  • Hi

    I have an application written in C# that processes emails using Exchange Web Services. Latest Nuget packages used (2.2.0). Recently a number of the emails being processed are generating an error in the System.XML as follows :

    Unexpected end of file has occurred. The following elements are not closed: t:MimeContent, t:Message, m:Items, m:GetItemResponseMessage, m:ResponseMessages, m:GetItemResponse, s:Body, s:Envelope. Line 1, position 5161706.

    Any ideas as to why this is occurring only recently and how to fix it?

    Thanks!!


    Laurence Lemmon-Warde

    Thursday, February 1, 2018 11:58 AM

Answers

  • Only way to fix this was by try catch - if MimeContent is corrupt I used "BodyText" - not quite MimeContent but at least gives the email content

    Laurence Lemmon-Warde

    • Marked as answer by Laurence73 Tuesday, March 20, 2018 2:56 PM
    Tuesday, March 20, 2018 2:56 PM