Soenneker.Email.Dispatcher 11.0.530

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Email.Dispatcher

Routes an EmailMessage either to Azure Service Bus or directly to an IEmailSender, based on the Email:UseQueue configuration value.

Install

dotnet add package Soenneker.Email.Dispatcher

Configure routing

{
  "Email": {
    "UseQueue": false
  }
}

The value is required and is read when EmailDispatcher is constructed. Changing configuration afterward does not change an existing dispatcher's route.

Register an IEmailSender, then choose the dispatcher lifetime that matches the consuming application:

using Microsoft.Extensions.DependencyInjection;
using Soenneker.Email.Dispatcher.Abstract;
using Soenneker.Email.Dispatcher.Registrars;
using Soenneker.Email.Senders.Abstract;

services.AddSingleton<IEmailSender, AppEmailSender>();
services.AddEmailDispatcherAsSingleton();

The singleton registration also registers the queue utility as singleton. Its IEmailSender dependency must be safe to capture and use for the application lifetime. Use AddEmailDispatcherAsScoped() with a scoped sender when dispatch behavior depends on request-scoped services.

Both registrations add the email utility and its Service Bus transmitter dependencies. An IEmailSender registration is still required even when queue routing is enabled because the dispatcher receives both routes through its constructor.

Dispatch a message

IEmailDispatcher dispatcher = serviceProvider.GetRequiredService<IEmailDispatcher>();

await dispatcher.Dispatch(message, cancellationToken);

With UseQueue: true, completion means the message was accepted by the configured Service Bus transmitter; delivery occurs later. With UseQueue: false, completion means the sender returned true. A false result from the sender becomes an InvalidOperationException so a failed direct send is not silently treated as success.

Cancellation stops pending work when the underlying route observes the token; it cannot retract a message already queued or sent.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 Soenneker.Email.Dispatcher:

Package Downloads
Soenneker.Email.Support

A utility that allows for quick access to support email sending

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.530 239 11/4/2026
11.0.529 104 11/3/2026
11.0.528 150 11/3/2026
11.0.527 78 11/3/2026
11.0.526 97 11/3/2026
11.0.525 91 11/3/2026
11.0.523 118 11/3/2026
11.0.522 128 11/2/2026
11.0.521 166 10/29/2026
11.0.520 151 10/28/2026
11.0.519 129 10/27/2026
11.0.518 114 10/27/2026
11.0.517 156 10/27/2026
11.0.516 90 10/27/2026
11.0.515 121 10/27/2026
11.0.514 113 10/27/2026
11.0.511 119 10/26/2026
11.0.510 124 10/26/2026
11.0.509 121 10/26/2026
11.0.508 117 10/26/2026
Loading failed

Updated Soenneker.Email.Util to 11.0.745