Sicos1977 / MsgKit

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

Convert EML file with MSG attachment to MSG file, the attachment becomes EML format #91

Closed sang2357 closed 3 months ago

sang2357 commented 2 years ago

Referring to the issue #issue-1246285318, is the method ConvertEmlToMsg in Converter.cs always set the attachment to extension eml, even the attachment is a msg?

if (bodyPart is MessagePart messagePart)
{
    messagePart.Message.WriteTo(attachmentStream);
    if (messagePart.Message != null)
        fileName = messagePart.Message.Subject;

    extension = ".eml";
}
kiwikoda commented 1 year ago

It looks like the conversion code assumes that all message attachments are in the same format as the parent email, but this is not always the case. There are many EML formatted messages in our datasource that have MSG attachments.

Sicos1977 commented 1 year ago

Can you sent me one example mail with your issue so that I have someting that I can use to test. If so then please ZIP te file before sending it to sicos2002@hotmail.com

Sicos1977 commented 3 months ago

This is probably not going to happen anymore so I'm closing this issue