i am creating mbox from pst file format but all emails are coming in single folder.
If you have any other query, please feel free to write to us. We shall look into your requirements and assist you further.
all pst emails from inbox and sent mails are coming in single folder, that is not good. i want to create saprate mbox for inbox, sent emails
Could you please share your sample files with us along with the code of conversion to mbox? We’ll investigate the issue further for assisting you further.
can you please provide me code for creating mbox for inbox only, i don’t want to include sent items and other folder?
Exporting a specific folder to MBox is not available in the API. We have requested our product team to provide feedback if this can be supported or even if it is possible. We’ll write back here once some information is available in this regard.
String path = “”;<o:p></o:p>
string fileName = Path.Combine(path, "test.pst");
string outFileName = Path.Combine(path, "Inbox.dat");
using (Stream outStream = new FileStream(outFileName, FileMode.Create))
using (MboxStorageWriter mboxStorage = new MboxrdStorageWriter(outStream, true))
using (PersonalStorage pst = PersonalStorage.FromFile(fileName))
FolderInfo inbox = pst.RootFolder.GetSubFolder("Inbox");
MessageInfoCollection messages = inbox.GetContents();
foreach (MessageInfo info in messages)
MapiMessage msg = pst.ExtractMessage(info.EntryId);
MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(msg.MessageClass);
MailMessage mail = mi.Interpret(msg);