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
<PackageReference Include="Soenneker.Dtos.Email" Version="11.0.330" />
<PackageVersion Include="Soenneker.Dtos.Email" Version="11.0.330" />
<PackageReference Include="Soenneker.Dtos.Email" />
paket add Soenneker.Dtos.Email --version 11.0.330
#r "nuget: Soenneker.Dtos.Email, 11.0.330"
#:package Soenneker.Dtos.Email@11.0.330
#addin nuget:?package=Soenneker.Dtos.Email&version=11.0.330
#tool nuget:?package=Soenneker.Dtos.Email&version=11.0.330
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Dtos.Email.Attachment (>= 11.0.88)
- Soenneker.Enums.Email.Format (>= 11.0.135)
- Soenneker.Enums.Email.Priority (>= 11.0.134)
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 |
Update dependency Soenneker.Enums.Email.Priority to 11.0.134 (#930)