TildeMail.Mail
0.2.1
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
<PackageReference Include="TildeMail.Mail" Version="0.2.1" />
<PackageVersion Include="TildeMail.Mail" Version="0.2.1" />
<PackageReference Include="TildeMail.Mail" />
paket add TildeMail.Mail --version 0.2.1
#r "nuget: TildeMail.Mail, 0.2.1"
#:package TildeMail.Mail@0.2.1
#addin nuget:?package=TildeMail.Mail&version=0.2.1
#tool nuget:?package=TildeMail.Mail&version=0.2.1
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 | Versions 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. |
-
net10.0
- DryIoc.dll (>= 5.4.3)
- MailKit (>= 4.18.2)
- Microsoft.Data.Sqlite (>= 10.0.14)
- MimeKit (>= 4.18.2)
- ReverseMarkdown (>= 6.3.0)
- Serilog (>= 4.4.0)
- TildeMail.Abstractions (>= 0.2.1)
- TildeMail.Core (>= 0.2.1)
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.