Soenneker.Email.Support 4.0.331

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

Sends a subject and HTML body to the application's configured support address through IEmailDispatcher.

Install

dotnet add package Soenneker.Email.Support

Configuration

{
  "Email": {
    "SupportAddress": "support@example.com"
  }
}

Email:SupportAddress is required and is read for each send. The dispatcher and selected sender also require their own configuration.

Registration

Register an IEmailSender implementation first, then the support utility:

using Soenneker.Email.Sender.Registrars;
using Soenneker.Email.Support.Registrars;

services.AddEmailSenderAsSingleton();
services.AddEmailSupportUtilAsSingleton();

AddEmailSupportUtilAsSingleton() registers the support utility and dispatcher as singletons. AddEmailSupportUtilAsScoped() registers both as scoped. Match the chosen sender lifetime: a singleton dispatcher must not capture a scoped sender.

The dispatcher constructor requires an IEmailSender even when queue routing is enabled, so a sender registration is always necessary.

Send to support

using Soenneker.Email.Support.Abstract;

IEmailSupportUtil support = serviceProvider.GetRequiredService<IEmailSupportUtil>();

await support.Send(
    "Import failed",
    "<p>The nightly customer import failed after 3 attempts.</p>",
    cancellationToken);

The utility creates an HTML EmailMessage, puts bodyHtml in the bodyText template token, uses normal priority, and identifies the current machine as the sender. Actual delivery is immediate or queued according to Email:UseQueue.

The HTML is not sanitized or encoded by this utility. Encode or sanitize untrusted values before including them. Completion follows dispatcher semantics: queued mode means accepted by the queue transport; direct mode means accepted by the sender. Cancellation cannot retract a message already queued or delivered.

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 Soenneker.Email.Support:

Package Downloads
Soenneker.Alerter.Util

A utility library for alert related operations and abstraction over other notification services

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.336 0 9/10/2026
4.0.335 0 9/9/2026
4.0.334 0 9/9/2026
4.0.333 24 9/9/2026
4.0.332 90 9/8/2026
4.0.331 67 9/8/2026
4.0.330 81 9/8/2026
4.0.329 106 9/8/2026
4.0.328 109 9/7/2026
4.0.327 104 9/7/2026
4.0.326 168 9/6/2026
4.0.325 101 9/6/2026
4.0.324 106 9/5/2026
4.0.323 85 9/5/2026
4.0.322 141 9/4/2026
4.0.321 118 9/4/2026
4.0.320 132 9/4/2026
4.0.319 107 9/4/2026
4.0.318 94 9/4/2026
4.0.317 95 9/4/2026
Loading failed

Updated Soenneker.Email.Dispatcher to 4.0.435