Aspose.Email (17.12.0, tested also with 23.9.0)
Certain emails are failing with the following exception:
{
"Message": "Compound File Binary Format corrupted",
"Data": {},
"InnerException": {
"Message": "Unable to read beyond the end of the stream.",
"Data": {},
"InnerException": null,
"TargetSite": "Void EndOfFile()",
"StackTrace": " at System.IO.__Error.EndOfFile()\r\n at System.IO.BinaryReader.FillBuffer(Int32 numBytes)\r\n at System.IO.BinaryReader.ReadUInt16()\r\n at #=z5l2$4RvNW3QK0u2tMmhBvzqVPedGP$7HhsUaVQg=..ctor(BinaryReader #=zLeovzgs=)\r\n at #=zuuedLrZ0Czd5L_uvRUtrMgOr8x8fW37VVA==.#=zsWDKe7s=()\r\n at #=zuuedLrZ0Czd5L_uvRUtrMgOr8x8fW37VVA==.#=zBfR5ss0=(Stream #=zyMO2rl8=)\r\n at #=zuuedLrZ0Czd5L_uvRUtrMgOr8x8fW37VVA==..ctor(Stream #=zyMO2rl8=)\r\n at Aspose.Email.Tools.FileFormatUtil.#=zbC1IzXxGJfeO(Stream #=zyMO2rl8=)",
"HelpLink": null,
"Source": "mscorlib",
"HResult": -2147024858,
"Type": "System.IO.EndOfStreamException"
},
"TargetSite": "Boolean #=zbC1IzXxGJfeO(System.IO.Stream)",
"StackTrace": " at Aspose.Email.Tools.FileFormatUtil.#=zbC1IzXxGJfeO(Stream #=zyMO2rl8=)\r\n at Aspose.Email.Mapi.MapiMessage.IsMsgFormat(Stream stream)\r\n at Aspose.Email.MailMessage.#=zALGPVYt0qD9g(Stream #=zyMO2rl8=, LoadOptions& #=zX7U$BBM=)\r\n at Aspose.Email.MailMessage.#=zg32bMjUJaNqL(Stream #=zyMO2rl8=, LoadOptions #=zX7U$BBM=)\r\n at Aspose.Email.MailMessage.Load(Stream stream)\r\n at xxxxxxxxxxxxxxx.Aspose.Provider.Tools.EmailTools.GetEmailInfo(Byte[] emailBytes),
"HelpLink": null,
"Source": "Aspose.Email",
"HResult": -2146233088,
"Type": "Aspose.Email.FileCorruptedException"
}
These emails open properly in MS Outlook, but fail with MailMessage.Load and with the Aspose Email Online tool at [(Free Online MSG Editor]((Free Online MSG Editor).
When checking the binary properties of a successful email vs. a failed email, I got the following results:
Good Email => image.jpg (96.0 KB)
Bad Email => image.jpg (90.2 KB)
One property that stood out was the MajorVersion. Good emails have a value of 62 for MajorVersion, but failing emails have 33.
Has anyone seen this kind of behavior, and is there a work-around for handling these kids of email files for Aspose.Email?