VOOZH about

URL: https://www.nuget.org/packages/Soenneker.Extensions.Dtos.Email/

⇱ NuGet Gallery | Soenneker.Extensions.Dtos.Email 4.0.375




👁 Image
Soenneker.Extensions.Dtos.Email 4.0.375

Prefix Reserved
dotnet add package Soenneker.Extensions.Dtos.Email --version 4.0.375
 
 
NuGet\Install-Package Soenneker.Extensions.Dtos.Email -Version 4.0.375
 
 
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.Extensions.Dtos.Email" Version="4.0.375" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Dtos.Email" Version="4.0.375" />
 
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.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.Extensions.Dtos.Email --version 4.0.375
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Extensions.Dtos.Email, 4.0.375"
 
 
#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.Extensions.Dtos.Email@4.0.375
 
 
#: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.Extensions.Dtos.Email&version=4.0.375
 
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Dtos.Email&version=4.0.375
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 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

👁 alternate text is missing from this package README image
Soenneker.Extensions.Dtos.Email

A collection of helpful EmailDto extension methods

?? Features

  • Converts a well-defined EmailDto into a MimeKit MimeMessage
  • Supports both html and plain formats
  • Adds To, Cc, Bcc, and Reply-To addresses
  • Automatically attaches files via EmailAttachmentDto
  • Sets headers for High and Low priority emails
  • Logs malformed recipients using ILogger

?? Validation

The extension validates:

  • Required fields: To, Subject, and Body
  • Non-null, non-whitespace addresses
  • Optionally logs issues rather than throwing for individual recipient fields

Installation

dotnet add package Soenneker.Extensions.Dtos.Email

?? Usage

var mimeMessage = emailDto.ToMimeMessage(logger);

?? Example EmailDto

var dto = new EmailDto
{
 To = new List<string> { "to@example.com" },
 Cc = new List<string> { "cc@example.com" },
 Bcc = new List<string> { "bcc@example.com" },
 ReplyTo = "reply@example.com",
 Name = "Sender Name",
 Address = "sender@example.com",
 Subject = "Test Subject",
 Body = "<p>This is a test email.</p>",
 Format = EmailFormat.Html,
 Priority = EmailPriority.High,
 Attachments = new List<EmailAttachmentDto>
 {
 new EmailAttachmentDto
 {
 FileName = "test.txt",
 MimeType = "text/plain",
 Data = Encoding.UTF8.GetBytes("Sample attachment content")
 }
 }
};
Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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.Extensions.Dtos.Email:

Package Downloads
Soenneker.Email.Sender

A high-level utility responsible for orchestrating the creation and delivery of templated email messages

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.375 0 6/19/2026
4.0.374 0 6/19/2026
4.0.373 0 6/18/2026
4.0.372 25 6/18/2026
4.0.371 22 6/18/2026
4.0.370 105 6/17/2026
4.0.369 92 6/16/2026
4.0.368 186 6/10/2026
4.0.367 119 6/10/2026
4.0.366 198 6/9/2026
4.0.365 195 6/6/2026
4.0.364 139 6/6/2026
4.0.363 105 6/6/2026
4.0.362 131 6/6/2026
4.0.361 127 6/6/2026
4.0.360 113 6/5/2026
4.0.359 127 6/5/2026
4.0.358 232 5/26/2026
4.0.357 208 5/13/2026
4.0.356 285 5/2/2026
Loading failed

Update dependency Soenneker.Extensions.Enumerable.String to 4.0.1376 (#810)