Working with MapiJournal in PST

Adding MapiJournal to PST

The Create a New PST File and Add Subfolders article shows how to create a PST file and add a subfolder to it. With Aspose.Email you can add MapiJournal to the Journal subfolder of a PST file that you have created or loaded. Below are the steps to add MapiJournal to a PST:

  1. Create a MapiJournal object
  2. Set the MapiJournal properties using a constructor and methods.
  3. Create a PST using the PersonalStorage.Create() method.
  4. Create a pre-defined folder (Journals) at the root of the PST file by accessing the root folder and then calling the AddMapiMessageItem() method.

The following code snippet shows you how to create a MapiJournal and then add it to the journal folder of a newly created PST file.

Adding Attachments to MapiJournal

The following code snippet shows you how to add attachments to MapiJournal.