DigitalZenWorks.Email.DbxOutlookExpress 1.3.25

dotnet add package DigitalZenWorks.Email.DbxOutlookExpress --version 1.3.25
                    
NuGet\Install-Package DigitalZenWorks.Email.DbxOutlookExpress -Version 1.3.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DigitalZenWorks.Email.DbxOutlookExpress" Version="1.3.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DigitalZenWorks.Email.DbxOutlookExpress" Version="1.3.25" />
                    
Directory.Packages.props
<PackageReference Include="DigitalZenWorks.Email.DbxOutlookExpress" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DigitalZenWorks.Email.DbxOutlookExpress --version 1.3.25
                    
#r "nuget: DigitalZenWorks.Email.DbxOutlookExpress, 1.3.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DigitalZenWorks.Email.DbxOutlookExpress@1.3.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DigitalZenWorks.Email.DbxOutlookExpress&version=1.3.25
                    
Install as a Cake Addin
#tool nuget:?package=DigitalZenWorks.Email.DbxOutlookExpress&version=1.3.25
                    
Install as a Cake Tool

DbxOutlookExpress

NuGet version NuGet downloads Build and tests License: MIT GitHub issues

A C# library for reading Outlook Express DBX files: folder information, message metadata, and message content. It reads files directly and does not require Outlook or Outlook Express to be running.

Installation

Add the package to your application:

dotnet add package DigitalZenWorks.Email.DbxOutlookExpress

Or use Visual Studio's Package Manager Console:

Install-Package DigitalZenWorks.Email.DbxOutlookExpress

Quick start

A good starting point...

DbxSet dbxSet = new (@"\path\to\your\dbx\files", Encoding.UTF8);
DbxFolder dbxFolder = dbxSet.GetNextFolder();
DbxMessage dbxMessage = dbxFolder.GetNextMessage();

For a more in-depth example of a project using this library, please refer to the DigitalZenWorks.Email.ToolKit Project

By default, when using GetNextFolder(), folders come out in an un-ordered list, mirroring the way they are stored in Folders.dbx file. This means that, occasionally, some child folders may come up before their parents. If you need the folders to be in an ordered list, use
dbxFoldersFile.SetTreeOrdered();

The list will then come up in an 'pre-order' ordered list.

Another Way:

Pass the directory containing the mail store's DBX files. Folders.dbx provides the folder hierarchy; the other DBX files contain folder messages. The encoding argument is a fallback when encoding detection is unsuccessful.

In a console application:

using System;
using System.Text;
using DigitalZenWorks.Email.DbxOutlookExpress;

if (args.Length != 1)
{
	Console.Error.WriteLine("Supply the directory containing the DBX files.");
	return;
}

DbxSet dbxSet = new(args[0], Encoding.UTF8);
dbxSet.SetTreeOrdered();
DbxFolder folder = dbxSet.GetNextFolder();

while (folder != null)
{
	string folderName = folder.FolderName ?? folder.FolderFileName;
	Console.WriteLine(folderName);
	DbxMessage message = folder.GetNextMessage();

	while (message != null)
	{
		Console.WriteLine(message.Subject);
		message = folder.GetNextMessage();
	}

	folder = dbxSet.GetNextFolder();
}

For example:

dotnet run -- "C:\MailBackup\OutlookExpress"

GetNextFolder() and GetNextMessage() return null when iteration is complete. A DbxMessage exposes metadata such as Subject, Sender, and ReceivedTime, plus message bytes through Message and a stream through MessageStream. Use GetAsFile(path) to write a message to a file.

Folder ordering

The example calls SetTreeOrdered() before iteration to traverse the Folders.dbx hierarchy in pre-order, with parents before their children. Omit that call to use the order recorded in Folders.dbx, which can place children before parents.

DbxSet also looks for DBX files missing from the folder index and appends those orphaned folders after indexed folders. DbxFolder.IsOrphan identifies these entries.

See the XML documentation in the library source for individual API contracts. Email.ToolKit is an example consumer of this library for migration workflows.

Target frameworks

The current Release configuration targets .NET Standard 2.0, .NET Framework 4.7.2, and .NET 5, 6, 7, 8, 9, and 10. Debug builds target .NET 10 only. See the package page for a published version's frameworks and its dependencies.

Build and test

Install the .NET 10 SDK, then clone and build the repository:

git clone https://github.com/jamesjohnmcguire/DbxOutlookExpress.git
cd DbxOutlookExpress
dotnet build DbxOutlookExpress.slnx --configuration Debug
dotnet test DbxOutlookExpress.slnx --configuration Debug

See the development notes for Release builds, versioning, trusted publishing, and the build.cmd helper.

Contributing

If you have found a bug or have a suggestion that would make this better, please fork this repository and create a pull request. You can also simply open an issue with the tag "bug" or "enhancement".

Process:

  1. Fork the Project
  2. Create your Bug / Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'Add some amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Coding style

Please match the current coding style. Most notably:

  1. One operation per line
  2. Use complete English words in variable and method names
  3. Attempt to declare variable and method names in a self-documenting manner
  4. Add unit tests

Acknowledgments

This project builds on earlier work deciphering the DBX format, notably Arne Schloh's original file-format research and Zvonko Tesic's updates. See the OE DBX format documentation.

License

Distributed under the MIT License.

Contact

James John McGuire — jamesjohnmcguire@gmail.com

Project repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DigitalZenWorks.Email.DbxOutlookExpress:

Package Downloads
DigitalZenWorks.Email.ToolKit

This client library provides functionality to help migrate email messages from dbx (Outlook Express) or eml format to Outlook. It also contains functionality to help clean up Outlook stores. Additional notes - https://github.com/jamesjohnmcguire/DigitalZenWorks.Email.ToolKit

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.25 103 11/5/2026
1.3.24 714 12/30/2024
1.3.23 350 8/31/2024
1.3.22 652 10/17/2023
1.3.20 273 9/16/2023
1.3.19 369 8/5/2023
1.3.18 684 4/22/2022
1.3.17 636 4/22/2022
1.3.16 632 4/17/2022
1.3.0.14 649 3/29/2022
1.3.0.13 698 1/18/2022
1.3.0.12 500 1/8/2022
1.2.0.11 515 12/31/2021
1.1.0.10 486 12/25/2021
1.0.0.5 619 12/14/2021