Dijji / XstReader

Xst Reader is an open source viewer for Microsoft Outlook’s .ost and .pst files, written entirely in C#. To download an executable of the current version, go to the releases tab.
Microsoft Public License
513 stars 72 forks source link
outlook pstfileviewer

Xst Reader

Xst Reader is an open source viewer for Microsoft Outlook’s .ost and .pst files, written entirely in C#, requiring only .Net Framework 4, and with no dependency on any Microsoft Office components.

It presents as a simple, classic, three pane mail viewer:

Xst Reader goes beyond Outlook in that it will allow you to open .ost files, which are the caches created by Outlook to hold a local copy of a mailbox. Wanting to read an .ost file as the original motivation for this project: now it also as the ability to export the header and body of an email in its native format (plain text, HTML, or rich text), and inspect and export all the properties of an email.

It requires only .Net Framework 4, which is installed by default on Windows 8.1 and later, but will need to be installed on Windows 7 and earlier systems before Xst Reader can be run. .Net Framework 4 can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=17851

Xst Reader is based on Microsoft’s documentation of the Outlook file formats in [MS-PST], first published in 2010 as part of the anti-trust settlement with the DOJ and the EU: https://msdn.microsoft.com/en-us/library/ff385210(v=office.12).aspx

XstExport

A command line tool for exporting emails, attachments or properties from an Outlook file.

By default, all folders in the Outlook file are exported into a directory structure that mirrors the Outlook folder structure. Options are available to specify the starting Outlook folder and to collapse all output into a single directory.

The differences from the export capabilities of the UI are: the ability to export from a subtree of Outlook folders; and the ability to export attachments only, without the body of the email.

In addition to XstExport, XstPortableExport is also provided, which is a portable version based on .Net Core 2.1 that can be run on Windows, Mac, Linux etc.

Both versions support the following options:

XstExport.exe {-e|-p|-a|-h} [-f=<Outlook folder>] [-o] [-s] [-t=<target directory>] <Outlook file name>

Where:

-e, --email
Export in native body format (.html, .rtf, .txt) with attachments in associated folder
-- OR --
-p, --properties
Export properties only (in CSV file)
-- OR --
-a, --attachments
Export attachments only (Latest date wins in case of name conflict)
-- OR --
-h, --help
Display this help

-f=<Outlook folder>, -folder=<Outlook folder>
Folder within the Outlook file from which to export. This may be a partial path, for example "Week1\Sent"

-o, --only
If set, do not export from subfolders of the nominated folder.

-s, --subfolders
If set, Outlook subfolder structure is preserved. Otherwise, all output goes to a single directory

-t=<target directory name>, --target=<target directory name>
The directory to which output is written. This may be an absolute path or one relative to the location of the Outlook file. By default, output is written to a directory <Outlook file name>.Export.<Command> created in the same directory as the Outlook file

<Outlook file name>
The full name of the .pst or .ost file from which to export

To run the portable version, open a command line and run:

dotnet XstPortableExport.dll <options as above>

Installation

To install a binary:

  1. Choose a release, then download the XstReader.zip file attached to it.
  2. Extract the contents of the zip file to a programs folder.
  3. Run XstReader.exe, and create shortcuts to it as required.

Notes for developers

Meta

Distributed under the MS-PL license. See license for more information.