Sicos1977 / MsgKit

A .NET library to make MSG files without the need for Outlook
199 stars 55 forks source link

Save as Stream is missing the CFBF header when compared to Save as Filename #86

Closed jerdobi closed 2 years ago

jerdobi commented 2 years ago

If you save as a stream the email the CFBF header is missing and when you use the stream to create a file this file cannot be opened by Outlook because the header is missing. Documents.zip

Sicos1977 commented 2 years ago

Work fine if I do something like this

using (var ms = new MemoryStream())
{
    email.Save(ms);
    File.WriteAllBytes("d:\\test2.msg", ms.ToArray());
}
Sicos1977 commented 2 years ago

I even can't use the Stream class because it is abstract. And if you have an issue with saving then you should contact the OpenMCDF project because that is what I use to do the saving.

https://github.com/ironfede/openmcdf