Conversion of MBOX to MSG by Subject Name

Hi, I am using Aspose Email.Net for Converting MBOX to MSG files. I have chosen an MBOX file that has 100 messages, some subject length is more than 400 characters and some doesn’t have the subject. Also, some subjects have special characters like (), $, &, *, @, etc.
I want to save all MBOX messages in MSG files with Subject file names. So, how can I do that with maintaining the subject and characters and length of the subject? Please provide some solution for that.

@rdnics

You can use following code example to covert MBOX to MSG. Hope this helps you.

string filePathMbox = MyDir + "input.mbox";
using (var mbox = new MboxrdStorageReader(filePathMbox, new MboxLoadOptions() { LeaveOpen = false }))
{
    int count = mbox.GetTotalItemsCount();
    for (int i = 0; i < count; i++)
    {
        Console.WriteLine("File_Unpack_MboxFile: Debug GetTotalItemsCount = " + mbox.GetTotalItemsCount());
        using (var message = mbox.ReadNextMessage())
        {
            string fileName = "Message " + i + ".msg";
            string filePath = Path.Combine(@"C:\Users\out\", fileName);
            message.Save(filePath, Aspose.Email.SaveOptions.DefaultMsg);
        }
    }
}

And if I want to save MBOX Messages to MSG by Date and From Email Address Then what is the process?

@rdnics

Do you want to sort the messages by Date and From? If yes, this is a missing feature in Aspose.Email for .NET. We have logged it in our issue tracking system as EMAILNET-40711. You will be informed once this feature is available. We apologize for your inconvenience.

@rdnics

It is to inform you that we have closed EMAILNET-40711 with ‘Won’t Fix’ resolution. The MBOX format structure does not support message ordering.