Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
493 stars 168 forks source link

GetEmailRecipientsRfc822Format() method throws a System.ArgumentOutOfRangeException #400

Closed kostelis closed 6 months ago

kostelis commented 7 months ago

When reading the recipients using this method message.GetEmailRecipientsRfc822Format(RecipientType.To) from an MSG file that is an invitation to an appointment, the MSGReader throws an exception:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at MsgReader.Outlook.RecipientRow..ctor(BinaryReader binaryReader, AddressType addressType, Boolean supportsRtf, Boolean displayNameIncluded, Boolean emailAddressIncluded, Boolean addressTypeIncluded, Boolean simpleDisplayNameIncluded, Boolean transmittableDisplayNameSameAsDisplayName, Boolean transmittableDisplayNameIncluded, Boolean stringsInUnicode)
   at MsgReader.Outlook.UnsendableRecipients..ctor(Byte[] data)
   at MsgReader.Outlook.Storage.GetUnsendableRecipients(String propIdentifier)
   at MsgReader.Outlook.Storage.Appointment..ctor(Storage message)
   at MsgReader.Outlook.Storage.Message.get_Appointment()
   at MsgReader.Outlook.Storage.Message.GetEmailRecipientsRfc822Format(RecipientType type)

To Reproduce Steps to reproduce the behavior: Create a Teams invitation MSG file. The particular MSG file that fails for me contains 5 recipients. We could share the file for investigation via email (we do not want to publicly expose it, as it may contain sensitive information).

Expected behavior It should read the recipients and return a string.

Desktop (please complete the following information):

Sicos1977 commented 6 months ago

Please ZIP the file before sending it to sicos2002@hotmail.com

Sicos1977 commented 6 months ago

No response... closed