Sicos1977 / MsgKit

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

MSG file size doubles after converting from EML #64

Closed priuser closed 4 years ago

priuser commented 4 years ago

creating EML files using mimekit and then using msgkit to convert to .MSG. The file size doubles in the newly created MSG file.

Sicos1977 commented 4 years ago

Does you eml file only have a body or does it also have attachments? MSGKit stores the body as unicode so this can double the message size since this is a 2 byte charset

priuser commented 4 years ago

Does you eml file only have a body or does it also have attachments? MSGKit stores the body as unicode so this can double the message size since this is a 2 byte charset

Hey, Thank you for getting back.

Yes it includes attachments also.

What’s the solution for this ?

Thank you!

Sicos1977 commented 4 years ago

Can you send me the file so that I can see what MSGKit is doing. If so then please send it to sicos2002@hotmail.com

Sicos1977 commented 4 years ago

I confirmed its a bug, the conversion code was writing twice to the same memorystream doubling all attachments in size. It is fixed in this commit d4b73a3dd217188539430302993a3b51c23ac19c

Sicos1977 commented 4 years ago

I just uploaded a new package to nuget. It should be available soon.

priuser commented 4 years ago

Perfect, Thank you much! Let me pull the latest in 3 hours and check it out! Appreciate all your help!

Sicos1977 commented 4 years ago

No problems ... if you make a mess then you have to clean it up :-)

priuser commented 4 years ago

Thank you the doubling issue is resolved!!!