Outlook data files, read directly from the file
PST.Kit is a Delphi library that reads Outlook data files – personal folders (.pst) and offline folders (.ost), ANSI and Unicode, with 512-byte and 4 KB pages – directly from the file, by Microsoft’s open specification [MS-PST]. It needs no Outlook, no MAPI and no COM, and it never writes to the file.
PST.Kit is the engine of our free PST Inspector. Files of any size are read through a memory-mapped file (Win64) or plain file reads (Win32).
Delphi 13 Florence · Win32 and Win64 · no Outlook, no MAPI, no COM · VCL-free (console, service, GUI) · read-only
What PST.Kit is for
- The folder hierarchy with item counts, contents tables, search folders and receive folders.
- Messages with their recipients, attachments and embedded messages at any depth.
- Every property, including the named properties, by tag or by canonical name (
PidTagInternetMessageId,PidLidTaskStatus). - The best body: HTML, RTF (compressed RTF decoded) or plain text, as Outlook would choose it.
- Signed and encrypted messages (S/MIME and OpenPGP) together with Crypto.Kit and MIME.Kit.
- Every message is also a message source for the other kits: save it as
.msg(Msg.Kit),.eml, iCalendar or vCard (MIME.Kit), or compare it with a JSON property dump. - Rendering helpers: a message as HTML for a viewer, sticky-note colours.
How it is organised
- One
uses PSTReader.PSTFile;givesTPSTFile,TPSTFolder,TPSTMessage,TPSTAttachment,TPSTRecipientandTPSTTable;PSTReader.PSTElementPropertiesadds the enumerations,Shared.PropTagsthe property ids. - Under the object model lie the layers of [MS-PST]: the on-disk structures, the node and block database (NDB), the lists, tables and property contexts (LTP) and the B-trees.
- File sources: memory-mapped or buffered file reads;
PSTReader.Render.Htmland.Vclfor viewers. - Clear rules: objects reached through a property belong to their parent, objects returned by a function belong to the caller; a damaged file raises
EPSTException, a damaged folder keeps what it could read and reports the rest; every date is local time, every string a plain Delphi string.
Getting started
The folder tree of a .pst file with the subject of every message. The messages of each folder are read through an own folder instance, so that a large file does not stay in memory:
uses System.SysUtils, PSTReader.PSTFile;
procedure Walk(AFile: TPSTFile; AFolder: TPSTFolder; const AIndent: string);
var
Sub, Own: TPSTFolder;
M: TPSTMessage;
begin
Writeln(AIndent, AFolder.DisplayName, ' (', AFolder.ContentCount, ')');
if AFolder.ContentCount > 0 then
begin
Own := AFile.GetFolder(AFolder.NID); // owned by us: its messages are freed with it
try
for M in Own.Messages do
Writeln(AIndent, ' ', DateTimeToStr(M.Date), ' ', M.From, ': ', M.Subject);
finally
Own.Free;
end;
end;
for Sub in AFolder.Folders do
Walk(AFile, Sub, AIndent + ' ');
end;
var
Pst: TPSTFile;
begin
Pst := TPSTFile.Create('C:\Mail\archive.pst');
try
Walk(Pst, Pst.IpmSubTree, '');
finally
Pst.Free;
end;
end.
The best body, the recipients and the attachments of a message; a property by its canonical name and the property dump:
procedure ShowMessage(M: TPSTMessage);
var
R: TPSTRecipient;
A: TPSTAttachment;
begin
Writeln(M.Subject);
for R in M.Recipients.ToRecipients do
Writeln(' To: ', R.DisplayName, ' <', R.EMailAddress, '>');
Writeln(M.BestBodyAsText); // HTML, RTF or text -- whichever is best
for A in M.Attachments do
if A.IsFile then
A.SaveToFolder('C:\Temp\Attachments');
Writeln(M.PropertyValue('PidTagInternetMessageId').ToString);
M.SavePropertyDump('C:\Temp\message.json'); // the same format in every kit
end;
More examples, the rules of ownership, errors and time zones, and every class, property, method and routine are in the Class Reference and Developer Guide.
Part of the IMIBO mail toolkit
Every kit gives the same answer for the same message: the kits share one property catalogue, one message contract and one JSON property dump, so a message read by one kit can be written, converted or compared by any other.
MAPI.Kit · PST.Kit · Msg.Kit · MIME.Kit · Crypto.Kit · Autodiscover.Kit
PST.Kit is developed by IMIBO; the source code is not public. For licensing, custom development or questions write to info@imibo.com.
PST.Kit Class Reference and Developer Guide (PDF)

PST.Kit 1.00 – Class Reference and Developer Guide · PDF, 50 pages, English, October 2026. Introduction, requirements and rules, the units at a glance, getting started, dates and strings, and the class reference – the PST file, folders, messages, properties, tables and folder views, rendering, file sources, helpers – with signed and encrypted mail, examples and the road map.
The document is free. Enter your email address and you will receive a personal download link.
Questions about PST.Kit: info@imibo.com.


