Hello,
Is there any .NET sample for ConvertPersonalStorageToMbox overloads?
Thanks.
Please check the following code examples. Hope this helps you.
PersonalStorage pst = PersonalStorage.FromFile("in.pst");
MailboxConverter.ConvertPersonalStorageToMbox(pst, "out.mbox", null);
PersonalStorage ost = PersonalStorage.FromFile("in.ost", false);
MboxStorageWriter writer = new MboxrdStorageWriter("out.mbox", false);
MailboxConverter.ConvertPersonalStorageToMbox(ost, writer, null);
Hello,
Please kindly clarify the difference between the above 2 samples, they are identical but the 2nd one has a mid-stage MboxStorageWriter involved.
The 1st one: MailboxConverter directly writes to the target
The 2nd one: MboxStorageWriter in involved and writes the output.
Thanks
You can use one of them to achieve your requirement. Please use the first code example and let us know if you face any issue.
Hello,
Sure I have tested both and both were working.
My question is the difference under the hood, using a mid-stage MboxrdStorageWriter will result in less performance for huge conversations or have some other advantages?
Perhaps the developer who knows the underlying code will have some idea
A ticket has been logged for your requirement as EMAILNET-40794. We will inform you once there is an update available on it.
The only difference in conversion when using Writer is the ability to convert multiple PST’s into one MBOX.
using (MboxStorageWriter writer = new MboxrdStorageWriter(File.Create(outputFile), false))
{
PersonalStorage pst1 = PersonalStorage.FromFile(inputFile1, false);
MailboxConverter.ConvertPersonalStorageToMbox(pst1, writer, null);
PersonalStorage pst2 = PersonalStorage.FromFile(inputFile2, false);
MailboxConverter.ConvertPersonalStorageToMbox(pst2, writer, null);
}
Thanks for the valuable info, really appreciate it, please add such important info to the docs, will save both parties time