TildeMail.Core 0.5.0

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

TildeMail.Core

The UI-independent services behind TildeMail. Use this library to compose a host that needs configuration, background jobs, commands, events or native DLL plugins; add TildeMail.Mail for mail access.

Responsibilities

  • Configuration, secrets expansion, localization, themes, search queries and persisted application state.
  • Typed plugin sections, validation, default persistence and schema auditing behind the SDK's AddConfig<T> API.
  • Command/input services, the event hub, job scheduler, service lifecycle, internal plugin registration and DLL plugin loading with required dependency ordering.
  • Public helpers that clean text coming from outside before it is shown or parsed (DisplayTextExtensions, ControlCharacters).
  • The mail runtime (backends, MIME reading, composition, GPG, cache, rules and new-mail watching) is in TildeMail.Mail, which builds on Core.

Core targets .NET 10 and references TildeMail.Abstractions. Its runtime packages include DryIoc, MimeKit (it validates the addresses of the configuration), Moongate.Core and Serilog. A secret written as #{command} in the configuration runs an external program; hosts supply that tool and the required configuration.

Core contains no terminal or Avalonia renderer and does not depend on Lua, TildeMail.Scripting or TildeMail.Mail. The application composes Core with the desired UI and optional scripting support. Native plugins that only register commands or implement shared contracts can reference Abstractions alone.

Example: a job scheduler with an explicit lifecycle

using DryIoc;
using TildeMail.Abstractions.Interfaces.Hosting;
using TildeMail.Core.Data.Config;
using TildeMail.Core.Extensions.Hosting;
using TildeMail.Core.Extensions.Jobs;

using var container = new Container();
container.RegisterHosting();
container.RegisterJobs(new JobsConfig());

var lifecycle = container.Resolve<IServiceLifecycle>();
await lifecycle.StartAsync(CancellationToken.None);
try
{
    // Run the host's work here. Services start only through the lifecycle.
}
finally
{
    await lifecycle.StopAsync(CancellationToken.None);
}

Each domain has its own registration extensions and dependencies; registering jobs does not configure a complete mail application. RegisterJobs registers only the scheduler. Hosts using Lua also call RegisterJobScripting from TildeMail.Scripting to expose jobs.

For typed plugin sections, import TildeMail.Core.Extensions.Config and call container.RegisterConfigSections(config) with the result of ConfigLoader.LoadAsync. This uses the original file snapshot without reading it again. A standalone host can instead call container.RegisterConfigSections(path, toml) with the text it has already read. A programmatically constructed TildeMailConfig has no source snapshot and installs no gateway. Plugins use AddConfig<T> from Abstractions; Core validates and appends missing defaults before application services start. IConfigSections.Warnings audits the snapshot against the schemas registered so far.

For internal plugins, import TildeMail.Core.Extensions.Plugins and use RegisterPlugin<T>(), RegisterPlugin(instance) or RegisterPlugins(...). Registration is immediate; the shared PluginRegistry validates each batch and orders required dependencies before consumers. PluginMetadata.Dependencies identifies required plugins and optional minimum versions. The registry shares IDs and loaded metadata with DLL plugins.

For DLL plugins, initialize the host registries before loading bundles and load plugins before resolving application services. Stop the lifecycle, dispose the container, then dispose PluginLoader. The development guide describes composition, and the plugin guide covers loading and shared assemblies.

Build and package

Run from the repository root with the .NET 10 SDK:

dotnet build src/TildeMail.Core -c Release
dotnet pack TildeMail.slnx -c Release -o artifacts/nuget

Packing the solution produces the four library packages together. Core declares a NuGet dependency on Abstractions; it does not embed that sibling assembly. The package includes its assembly, XML API documentation and this README, with portable symbols in a matching .snupkg. Version, authors and license metadata come from Directory.Build.props.

The NuGet development instructions explain local installation. Generating packages does not publish them to a registry.

License

GPL-3.0-or-later. See the license and third-party notices for dependency licenses.

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 (2)

Showing the top 2 NuGet packages that depend on TildeMail.Core:

Package Downloads
TildeMail.Scripting

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

TildeMail.Mail

Mail runtime for TildeMail: IMAP and Maildir backends, SMTP delivery, MIME reading, message composition, GPG, the mail cache, rules and new-mail watching.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 0 11/1/2026
0.4.1 2 11/1/2026
0.4.0 33 11/1/2026
0.3.0 61 10/31/2026
0.2.1 47 10/30/2026
0.2.0 48 10/30/2026