How to Convert MSG File to PST File Using Aspose.Email?

Please sir I will be thank full to you
This message was posted using Aspose.Live 2 Forum

Hi,


Thank you for inquiry.

I am sorry, we do not support MSG to PST conversion.

However, it is possible to load a PST file and extract the messages in MSG format. You may refer to http://www.aspose.com/documentation/.net-components/aspose.network-for-.net/managing-message-files-with-aspose-network-outlook.html for MSG and PST file handling features of Aspose.Network for .NET.

Hi,


.MSG file is an email message and .PST file is a collection of messages, contacts and other items.

Currently, we can do PST to MSG (extract MSG files from PST).

We have plan to do MSG to PST (add/import MSG files into PST) in future. The issue is logged in our system (ID: 11246). We will inform you when it gets available. Sorry for the inconvenience.

@shiv.mymail,
You can add email messages to PST files as shown below:

PersonalStorage personalStorage = PersonalStorage.Create("test.pst", FileFormatVersion.Unicode);
FolderInfo inboxFolder = personalStorage.RootFolder.AddSubFolder("Inbox");

MapiMessage mapiMessage = MapiMessage.FromFile("test.msg");
inboxFolder.AddMessage(mapiMessage);

More examples: Working with Messages in a PST File
API Reference: PersonalStorage Class, FolderInfo Class