TildeMail.Mail 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TildeMail.Mail --version 0.2.1
                    
NuGet\Install-Package TildeMail.Mail -Version 0.2.1
                    
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="TildeMail.Mail" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TildeMail.Mail" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="TildeMail.Mail" />
                    
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 TildeMail.Mail --version 0.2.1
                    
#r "nuget: TildeMail.Mail, 0.2.1"
                    
#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 TildeMail.Mail@0.2.1
                    
#: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=TildeMail.Mail&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=TildeMail.Mail&version=0.2.1
                    
Install as a Cake Tool

TildeMail.Mail

The mail runtime of TildeMail. Use this library to compose a host that reads, searches, writes and watches mail without the terminal interface or the Lua engine.

Responsibilities

  • IMAP and Maildir backends and their factory, SMTP delivery.
  • MIME reading (IMessageReader, OpenedMessage), message composition and the GPG integration of the mail: signing, encrypting, verifying, decrypting and looking up keys.
  • The SQLite mail cache and the Maildir index.
  • The mail rules and the synchronization and watching of new mail.

Dependencies

Mail targets .NET 10 and references TildeMail.Core (configuration, secrets, localization, jobs, events, lifecycle) and TildeMail.Abstractions (the shared contracts). Its direct packages are DryIoc, MailKit, MimeKit, ReverseMarkdown, Microsoft.Data.Sqlite and Serilog. Core does not reference Mail; TildeMail.Scripting and the tmail application do. Some operations invoke external programs, such as gpg; the host provides them.

The namespaces follow the folders, bucket first: TildeMail.Mail.Services.Mail, TildeMail.Mail.Interfaces.Gpg, TildeMail.Mail.Data.Mail, and so on for the domains Mail, Compose, Gpg, Cache, Rules and Sync. They were TildeMail.Core.<Bucket>.<Domain> before the extraction; code and plugins that used the old names must update their using lines and be rebuilt, as no type forwarders are provided.

Example: opening a message

using TildeMail.Abstractions.Data.Mail;
using TildeMail.Mail.Services.Gpg;
using TildeMail.Mail.Services.Mail;

var gpg = new GpgService();
var reader = new MessageReader(gpg, new PgpMimeBuilder(gpg));

// `message` is the MailMessage that a backend returned for a message of the mailbox
var opened = await reader.OpenAsync(message, CancellationToken.None);
Console.WriteLine($"{opened.Signature}: {opened.BodyText}");

The reader never trusts what the message says about itself: the text is cleaned before it can be shown, a signature is Good only when its key has a user id for the From address, and an encrypted message that cannot be decrypted says why instead of showing the ciphertext.

Plugins

A DLL plugin that uses the mail services references this library. The tmail host shares the Mail assembly with plugins; a standalone host passes typeof(IMessageReader).Assembly to PluginLoader. See Plugins.

Packaging

Packing the solution produces the four library packages together. Mail declares NuGet dependencies on Core and Abstractions; it does not embed the sibling assemblies. The package contains the assembly, XML API documentation and this README; portable debug symbols are in the matching .snupkg. Version, authors and license metadata come from Directory.Build.props.

Product Compatible and additional computed target framework versions.
.NET 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. 
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 TildeMail.Mail:

Package Downloads
TildeMail.Scripting

Lua scripting engine, sandbox and modules for TildeMail commands, keybindings, mail events and jobs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 0 10/31/2026
0.2.1 27 10/30/2026
0.2.0 31 10/30/2026