Soenneker.Dtos.Email 11.0.330

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

Defines a transport-friendly email envelope with recipients, sender details, content, priority, and attachments.

Installation

dotnet add package Soenneker.Dtos.Email

Usage

using Soenneker.Dtos.Email;
using Soenneker.Dtos.Email.Attachment;
using Soenneker.Enums.Email.Format;
using Soenneker.Enums.Email.Priority;

var email = new EmailDto
{
    To = ["customer@example.com"],
    Cc = ["account-owner@example.com"],
    ReplyTo = "support@example.com",
    Name = "Example Support",
    Address = "support@example.com",
    Subject = "Your receipt",
    Body = "<p>Thanks for your order.</p>",
    Format = EmailFormat.Html,
    Priority = EmailPriority.Normal,
    Attachments =
    [
        new EmailAttachmentDto
        {
            FileName = "receipt.pdf",
            MimeType = "application/pdf",
            Data = receiptBytes
        }
    ]
};

Format defaults to EmailFormat.Html; set EmailFormat.Plaintext for plain text. Priority defaults to EmailPriority.Normal, with Low and High also available.

JSON shape

Optional recipient lists, ReplyTo, and Attachments remain null unless assigned. To, Name, Address, Subject, and Body are not initialized by the parameterless constructor even though their C# types are non-nullable; populate them before sending or serialization.

The DTO does not validate or normalize addresses, require recipients, sanitize HTML, encode plain text, infer MIME types, limit attachment size, or send the message. Treat untrusted HTML as unsafe until it has passed the application’s content policy, and enforce provider-specific recipient and attachment limits before dispatch.

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

Showing the top 2 NuGet packages that depend on Soenneker.Dtos.Email:

Package Downloads
Soenneker.Extensions.Dtos.Email

A collection of helpful EmailDto extension methods

Soenneker.AutoFaker.Overrides.Emails

An AutoFaker (AutoBogus) override for the DTO EmailDto

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.330 0 11/14/2026
11.0.329 46 11/14/2026
11.0.328 119 11/11/2026
11.0.327 83 11/11/2026
11.0.326 112 11/11/2026
11.0.325 84 11/11/2026
11.0.324 397 11/2/2026
11.0.323 87 11/2/2026
11.0.322 291 10/26/2026
11.0.321 132 10/26/2026
11.0.320 169 10/26/2026
11.0.319 162 10/26/2026
4.0.318 412 10/15/2026
4.0.317 108 10/15/2026
4.0.316 124 10/14/2026
4.0.311 184 10/14/2026
4.0.310 138 10/14/2026
4.0.308 129 10/14/2026
4.0.300 163 10/13/2026
4.0.298 189 10/12/2026
Loading failed

Update dependency Soenneker.Enums.Email.Priority to 11.0.134 (#930)