AxisEmail 2.2.0

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

AxisEmail — Documentation

🌐 Português (documentação navegável)

A one-method email port — IAxisEmailService.SendAsync(AxisEmailData) returning an AxisResult. The bundled AxisEmail.MimeKit adapter handles SMTP (gmail, SES, Mailtrap, anywhere with credentials and a port). The application code never sees MimeMessage or SmtpClient.

public Task<AxisResult> NotifyOrderShippedAsync(Order order)
    => email.SendAsync(new AxisEmailData
    {
        To      = [(order.Customer.Name, order.Customer.Email)],
        Subject = $"Your order {order.OrderId} has shipped",
        Body    = $"Hi {order.Customer.Name}, your order is on its way.",
    });

Use this page as a map: read the trunk below (~5 min) and jump straight to the detail of the group you need — without reading hundreds of lines.


The trunk (read first)

The interface in 60 seconds

public interface IAxisEmailService
{
    Task<AxisResult> SendAsync(AxisEmailData data);
}

One method. The payload (AxisEmailData) carries recipients (To + Cc), subject, body and the body's MIME subtype (plain or html). Sender, SMTP host and credentials live in AxisEmailSettings, bound from configuration. → The IAxisEmailService contract

The payload — AxisEmailData

public record AxisEmailData
{
    public required IEnumerable<(string Name, string Email)> To { get; init; }
    public required string Subject { get; init; }
    public required string Body { get; init; }
    public string BodyTextType { get; init; } = "plain";          // or "html"
    public IEnumerable<(string Name, string Email)> Cc { get; init; } = [];
}

→ Email payload · AxisEmailData

Bundled adapter — MimeKit

AxisEmail.MimeKit is the MailKit / MimeKit implementation. SMTP host, port, SSL, sender and password come from configuration. → AxisEmail.MimeKit adapter

services.AddAxisMimeKitEmail(builder.Configuration);

Installation

dotnet add package AxisEmail            # the abstraction
dotnet add package AxisEmail.MimeKit    # the MimeKit/MailKit adapter

→ Full guide: Getting started


The map (jump to what you need)

Group You want to… Detail
Contract · IAxisEmailService ⭐ send one email iaxisemailservice.md
Payload · AxisEmailData the shape of an email axis-email-data.md
Settings · AxisEmailSettings configure SMTP and sender settings.md
MimeKit · AxisEmail.MimeKit the bundled MailKit adapter mimekit-adapter.md
Custom adapter write your own (SendGrid, SES, Mailgun) custom-adapter.md
Why? the case against SmtpClient directly why-axisemail.md
Reference every member at a glance api-reference.md

Start here: Getting started · The IAxisEmailService contract · Why AxisEmail?

Fundamentals: Email payload · Settings · AxisEmail.MimeKit adapter

Reference & extras: Custom adapter · API reference


Design principles

  1. One method, one payload. Everything an email needs lives in AxisEmailData. Adapters never invent extra parameters.
  2. Credentials live in AxisEmailSettings. Application code never sees the password. Configuration binds the secrets once.
  3. Errors are values. SMTP failures, auth errors, timeouts — all collapse into a single AxisError.InternalServerError("ERROR_SENDING_EMAIL") so callers handle them like any other rail failure.
  4. The adapter is replaceable. Drop in AddSendGridEmail() and the application is none the wiser.
  5. HTML or plain. BodyTextType picks the MIME subtype — plain by default, html for templated mails.

License

Apache 2.0

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 AxisEmail:

Package Downloads
AxisEmail.MimeKit

Part of the Axis Framework — an opinionated, ports-and-adapters .NET framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 148 7/21/2026
2.1.1 129 7/17/2026
2.1.0 117 7/17/2026
2.0.1 135 7/15/2026
2.0.0 143 7/15/2026