Mailtria developer kit 1.0.0 (released 2026-10-31)
==================================================

The engine behind https://mailtria.com for your own software: read, repair,
split, merge, deduplicate, import, export and convert Outlook PST and OST
files. Everything runs on your computer; the library has no network code.

Reading is free: open a file, list folders and messages, read a message and
its attachments, check a file, and dry runs. Writing a result needs a
licence key. Start a free 7-day trial, or buy a licence, on
https://mailtria.com/account under "Developer kit".

What is in this folder
----------------------

  mailtria.dll, mailtria.dll.lib   the library (and the import library for MSVC)
  include/mailtria.h               the C interface
  python/mailtria.py               Python 3.8+, standard library only
  dotnet/Mailtria.Net.dll          .NET 8+ (Mailtria.cs: the same as source)
  go/mailtria/                     a Go package (cgo, or none on Windows)
  java/com/mailtria/Mailtria.java  Java 22+ (Foreign Function & Memory API)
  samples/                         one short program per language
  LICENCE.txt                      what each licence allows
  THIRD-PARTY-NOTICES.txt          open-source parts inside the library

Every call takes and returns JSON; each language turns it into its own
objects. Keep mailtria.dll next to your program (or on PATH).

Python
------

  Copy python/mailtria.py and mailtria.dll next to your script.

    import mailtria
    mailtria.licence("MTK1-...")              # writing needs a key
    with mailtria.open("archive.pst") as pst:   # reading is free
        for folder in pst.walk():
            print(folder.path, folder.count)
    report = mailtria.export("archive.pst", "archive.zip", format="eml")
    print(report.status, report.output_items)

.NET
----

  Reference dotnet/Mailtria.Net.dll and copy mailtria.dll to your output
  folder (or add Mailtria.cs to a .NET 6 or 7 project).

    using Mailtria;
    Kit.SetLicence("MTK1-...");
    using var pst = PstFile.Open("archive.pst");
    foreach (var f in pst.Walk()) Console.WriteLine($"{f.Path} {f.Count}");
    var report = Kit.Export("archive.pst", "archive.zip", "eml");

Go
--

  Copy go/mailtria into your module and mailtria.dll into that folder.
  Without a C compiler on Windows the package loads mailtria.dll at run
  time (next to your program, on PATH, or MAILTRIA_LIBRARY).

    mailtria.SetLicence("MTK1-...")
    pst, err := mailtria.Open("archive.pst")
    defer pst.Close()
    report, err := mailtria.Export("archive.pst", "archive.zip", "eml")

Java
----

  Add java/com/mailtria/Mailtria.java to your sources; run with
  --enable-native-access=ALL-UNNAMED and mailtria.dll in the working
  folder (or MAILTRIA_LIBRARY set to its path).

    Mailtria.setLicence("MTK1-...");
    try (var pst = Mailtria.open("archive.pst")) { ... }
    var report = Mailtria.export("archive.pst", "archive.zip", "eml");

C and C++
---------

  #include "mailtria.h" and link mailtria.dll.lib (MSVC) or mailtria.dll
  (MinGW). samples/c/inspect.c shows the calls.

Operations
----------

  inspect    check a file read-only and summarize it
  repair     scan a damaged PST; with "out" recover it into a new PST
  split      by year, month, top folder or size, into checked parts
  merge      merge PST files into a new one
  dedup      count duplicates; with "out" write a copy without them
  export     PST or OST to EML, MBOX or MSG files in a ZIP
  import     EML, MSG and MBOX files and folders into a new PST
  convert    an OST (or PST) into a new PST

The options are the `pst` command line's (https://mailtria.com/developers),
and every operation returns the same report: status, counts, outputs,
warnings and errors. Outputs never replace an existing file, and every
result is read back and checked before it is kept.

Return codes: 0 passed, 3 passed with warnings, 4 incomplete, 1 failed,
2 bad request, 5 licence key needed, 6 unknown handle, 9 internal error.

Your key
--------

  The key names your licence (Developer, Redistribution or trial) and the
  licensee shown on your account page. It works offline and is not tied to
  a computer. It covers kit versions released until the "updates until"
  date on your account; those keep working after it. Keep the key out of
  public repositories. If Windows says it protected your PC when you run a
  program that uses the kit, the library is not code-signed yet.

Help: support@mailtria.com
