# EmailStoreSalvage

Recovers readable items from damaged Outlook Express DBX databases and Outlook for Mac OLM archives that the normal readers reject.

Class 

`OfficeIMO.Email.Store`

**Namespace**

`OfficeIMO.Email.Store`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[EmailStoreSalvage.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Email/Store/Recovery/EmailStoreSalvage.cs#L19)

**Modifiers**

static

Recovers readable items from damaged Outlook Express DBX databases and Outlook for Mac OLM archives that the normal readers reject. Each item is written independently with a provenance manifest; the source is never modified and nothing is written outside the destination directory.

## Inheritance

- object
- EmailStoreSalvage

Filter members 

Show inherited

## Methods

RecoverDbxToDirectory 2 overloads

`public static EmailStoreSalvageReport RecoverDbxToDirectory(string sourcePath, string destinationDirectory, EmailStoreSalvageOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-recoverdbxtodirectory-string-string-officeimo-email-store-emailstoresalvageoptions-threading-cancellationtoken)

[EmailStoreSalvage.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Email/Store/Recovery/EmailStoreSalvage.cs#L19)

Scans a DBX message database for message records and linked MIME fragments, independent of its active index, and writes every readable message. Broken fragment chains yield partial messages with offsets.

Parameters

**sourcePath string required**

**destinationDirectory string required**

**options OfficeIMO.Email.Store.EmailStoreSalvageOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailStoreSalvageReport`

`public static EmailStoreSalvageReport RecoverDbxToDirectory(Stream source, string? sourceName, string destinationDirectory, EmailStoreSalvageOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-recoverdbxtodirectory-io-stream-string-string-officeimo-email-store-emailstoresalvageoptions-threading-cancellationtoken)

[EmailStoreSalvage.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Email/Store/Recovery/EmailStoreSalvage.cs#L30)

Scans a readable, seekable DBX stream. The stream position is restored afterwards.

Parameters

**source System.IO.Stream required**

**sourceName string? required**

**destinationDirectory string required**

**options OfficeIMO.Email.Store.EmailStoreSalvageOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailStoreSalvageReport`

RecoverOlmToDirectory 2 overloads

`public static EmailStoreSalvageReport RecoverOlmToDirectory(string sourcePath, string destinationDirectory, EmailStoreSalvageOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-recoverolmtodirectory-string-string-officeimo-email-store-emailstoresalvageoptions-threading-cancellationtoken)

[EmailStoreSalvage.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Email/Store/Recovery/EmailStoreSalvage.cs#L40)

Reads an OLM archive through its central directory or, when that is damaged or missing, its local entry headers. Entries are verified against their CRC-32; unreadable XML entries are reported and skipped, and complete records in a truncated XML entry are still recovered.

Parameters

**sourcePath string required**

**destinationDirectory string required**

**options OfficeIMO.Email.Store.EmailStoreSalvageOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailStoreSalvageReport`

`public static EmailStoreSalvageReport RecoverOlmToDirectory(Stream source, string? sourceName, string destinationDirectory, EmailStoreSalvageOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-recoverolmtodirectory-io-stream-string-string-officeimo-email-store-emailstoresalvageoptions-threading-cancellationtoken)

[EmailStoreSalvage.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Email/Store/Recovery/EmailStoreSalvage.cs#L54)

Reads a readable, seekable OLM stream, which must not change during recovery; a change detected while copying verified data stops recovery with an IOException. The stream position is restored afterwards.

Parameters

**source System.IO.Stream required**

**sourceName string? required**

**destinationDirectory string required**

**options OfficeIMO.Email.Store.EmailStoreSalvageOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailStoreSalvageReport`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:DF5A153A7FFC975EC5BC8DEA6217CE0C767C3E546FBFA20CCEFBE9CDF181FE58 -->
