Hello,
There is an issue when converting some specific MSG into MIME messages, using the Apose.Email for C# API.
The PST you will find as an attachment only contains one MSG. When trying to convert the latter into a MBOX file, this single MSG will be displayed as two distinct MIME messages in Thunderbird.
The reason why is the presence of the “From” word in the body of the message, which is detected as a header, and therefore as a new message by Thunderbird.
In order to avoid this issue, the “From” word in the body should be changed into “>From” when proceeding to the conversion. This is called “From-mumge” as you can read in the MBOX wikipedia article : Mbox - Wikipedia
When adding the “>” before the “From”, Thunderbird displays the MIME message correctly as one single message.
The code to convert the PST into a MBOX is:
using (var pst = PersonalStorage.FromFile(currentPstPath))
{
var folderInfo = pst.RootFolder;
MboxrdStorageWriter writer = new MboxrdStorageWriter(mboxPath, false);
var options = new MailConversionOptions();
foreach (var msg in folderInfo.EnumerateMapiMessages())
{
writer.WriteMessage(msg.ToMailMessage(options))
}
writer.Dispose();
}
Best regards.
Some2Buy.zip (16,3 Ko)