Saving a msg as emlx from PST

Hi,


how can I save a message as emlx that is extracted from PST?

Hi Aaron,

Thank you for writing to Aspose support team.
Please give a try to the following sample code and let us know the feedback.

PersonalStorage pst = PersonalStorage.FromFile("input.pst");
FolderInfo folderInfo = pst.RootFolder.GetSubFolder("Inbox");
MessageInfoCollection messageInfoCollection = folderInfo.GetContents();

foreach (MessageInfo info in messageInfoCollection)
{
    MapiMessage mapi = pst.ExtractMessage(info);
    MailMessageInterpretor interpretor = MailMessageInterpretorFactory.Instance.GetIntepretor(mapi.MessageClass);
    MailMessage mailMessage = interpretor.Interpret(mapi);
    
    //SaveOptions.
    mailMessage.Save("output.emlx", MsgSaveOptions.CreateSaveOptions(MailMessageSaveType.EmlxFormat));
}