We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Saving a msg as emlx from PST


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);


mailMessage.Save("output.emlx", MsgSaveOptions.CreateSaveOptions(MailMessageSaveType.EmlxFormat));