Soenneker.Extensions.Dtos.Email
3.0.23
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Extensions.Dtos.Email --version 3.0.23
NuGet\Install-Package Soenneker.Extensions.Dtos.Email -Version 3.0.23
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="3.0.23" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Dtos.Email" Version="3.0.23" />
<PackageReference Include="Soenneker.Extensions.Dtos.Email" />
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 3.0.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Extensions.Dtos.Email, 3.0.23"
#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.
#addin nuget:?package=Soenneker.Extensions.Dtos.Email&version=3.0.23
#tool nuget:?package=Soenneker.Extensions.Dtos.Email&version=3.0.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Extensions.Dtos.Email
A collection of helpful EmailDto extension methods
📧 Features
- Converts a well-defined
EmailDto
into a MimeKitMimeMessage
- Supports both
html
andplain
formats - Adds
To
,Cc
,Bcc
, andReply-To
addresses - Automatically attaches files via
EmailAttachmentDto
- Sets headers for
High
andLow
priority emails - Logs malformed recipients using
ILogger
🧪 Validation
The extension validates:
- Required fields:
To
,Subject
, andBody
- 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 | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net9.0
- MimeKit (>= 4.11.0)
- Soenneker.Dtos.Email (>= 3.0.21)
- Soenneker.Extensions.Enumerable.String (>= 3.0.1096)
- Soenneker.Extensions.String (>= 3.0.464)
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 |
---|---|---|
3.0.170 | 133 | 5/28/2025 |
3.0.169 | 105 | 5/28/2025 |
3.0.168 | 117 | 5/27/2025 |
3.0.167 | 184 | 5/27/2025 |
3.0.166 | 142 | 5/27/2025 |
3.0.165 | 114 | 5/27/2025 |
3.0.164 | 137 | 5/27/2025 |
3.0.163 | 126 | 5/27/2025 |
3.0.162 | 125 | 5/27/2025 |
3.0.161 | 201 | 5/25/2025 |
3.0.160 | 122 | 5/25/2025 |
3.0.159 | 197 | 5/23/2025 |
3.0.158 | 106 | 5/23/2025 |
3.0.157 | 101 | 5/23/2025 |
3.0.156 | 100 | 5/23/2025 |
3.0.155 | 109 | 5/23/2025 |
3.0.154 | 118 | 5/23/2025 |
3.0.153 | 125 | 5/22/2025 |
3.0.152 | 121 | 5/22/2025 |
3.0.151 | 483 | 5/14/2025 |
3.0.150 | 266 | 5/14/2025 |
3.0.149 | 208 | 5/14/2025 |
3.0.148 | 295 | 5/8/2025 |
3.0.147 | 126 | 5/8/2025 |
3.0.146 | 200 | 5/8/2025 |
3.0.145 | 124 | 5/8/2025 |
3.0.144 | 128 | 5/8/2025 |
3.0.143 | 123 | 5/8/2025 |
3.0.142 | 128 | 5/7/2025 |
3.0.141 | 125 | 5/7/2025 |
3.0.140 | 127 | 5/7/2025 |
3.0.139 | 329 | 5/6/2025 |
3.0.138 | 146 | 5/5/2025 |
3.0.137 | 135 | 5/5/2025 |
3.0.136 | 153 | 5/5/2025 |
3.0.135 | 146 | 5/5/2025 |
3.0.134 | 123 | 5/5/2025 |
3.0.133 | 150 | 5/5/2025 |
3.0.132 | 120 | 5/5/2025 |
3.0.131 | 121 | 5/5/2025 |
3.0.130 | 177 | 5/5/2025 |
3.0.129 | 126 | 5/5/2025 |
3.0.128 | 157 | 5/5/2025 |
3.0.126 | 161 | 5/5/2025 |
3.0.125 | 239 | 4/29/2025 |
3.0.124 | 202 | 4/27/2025 |
3.0.123 | 88 | 4/27/2025 |
3.0.122 | 148 | 4/26/2025 |
3.0.121 | 58 | 4/26/2025 |
3.0.120 | 418 | 4/9/2025 |
3.0.119 | 154 | 4/9/2025 |
3.0.118 | 153 | 4/9/2025 |
3.0.117 | 149 | 4/8/2025 |
3.0.116 | 162 | 4/8/2025 |
3.0.115 | 144 | 4/8/2025 |
3.0.114 | 145 | 4/8/2025 |
3.0.113 | 150 | 4/8/2025 |
3.0.112 | 143 | 4/8/2025 |
3.0.111 | 151 | 4/8/2025 |
3.0.110 | 148 | 4/8/2025 |
3.0.109 | 154 | 4/8/2025 |
3.0.108 | 144 | 4/8/2025 |
3.0.107 | 417 | 4/8/2025 |
3.0.106 | 137 | 4/8/2025 |
3.0.105 | 137 | 4/8/2025 |
3.0.104 | 157 | 4/8/2025 |
3.0.103 | 144 | 4/8/2025 |
3.0.102 | 152 | 4/8/2025 |
3.0.101 | 144 | 4/8/2025 |
3.0.100 | 148 | 4/8/2025 |
3.0.99 | 143 | 4/8/2025 |
3.0.98 | 139 | 4/8/2025 |
3.0.97 | 151 | 4/8/2025 |
3.0.96 | 141 | 4/8/2025 |
3.0.95 | 146 | 4/8/2025 |
3.0.94 | 136 | 4/7/2025 |
3.0.93 | 149 | 4/7/2025 |
3.0.92 | 137 | 4/7/2025 |
3.0.91 | 372 | 4/7/2025 |
3.0.90 | 142 | 4/7/2025 |
3.0.89 | 144 | 4/7/2025 |
3.0.88 | 199 | 4/7/2025 |
3.0.87 | 141 | 4/7/2025 |
3.0.86 | 143 | 4/7/2025 |
3.0.85 | 148 | 4/7/2025 |
3.0.84 | 144 | 4/7/2025 |
3.0.83 | 263 | 4/7/2025 |
3.0.82 | 145 | 4/7/2025 |
3.0.81 | 147 | 4/7/2025 |
3.0.80 | 146 | 4/7/2025 |
3.0.79 | 144 | 4/7/2025 |
3.0.78 | 215 | 4/7/2025 |
3.0.77 | 145 | 4/7/2025 |
3.0.76 | 148 | 4/7/2025 |
3.0.75 | 186 | 4/7/2025 |
3.0.74 | 149 | 4/7/2025 |
3.0.73 | 174 | 4/6/2025 |
3.0.72 | 141 | 4/6/2025 |
3.0.71 | 143 | 4/6/2025 |
3.0.70 | 152 | 4/6/2025 |
3.0.69 | 143 | 4/6/2025 |
3.0.68 | 138 | 4/6/2025 |
3.0.67 | 157 | 4/6/2025 |
3.0.66 | 115 | 4/6/2025 |
3.0.65 | 136 | 4/6/2025 |
3.0.64 | 125 | 4/6/2025 |
3.0.63 | 125 | 4/6/2025 |
3.0.62 | 117 | 4/6/2025 |
3.0.61 | 125 | 4/6/2025 |
3.0.60 | 132 | 4/6/2025 |
3.0.59 | 102 | 4/6/2025 |
3.0.58 | 96 | 4/6/2025 |
3.0.57 | 97 | 4/6/2025 |
3.0.56 | 117 | 4/6/2025 |
3.0.55 | 107 | 4/6/2025 |
3.0.54 | 99 | 4/6/2025 |
3.0.53 | 124 | 4/5/2025 |
3.0.52 | 74 | 4/5/2025 |
3.0.51 | 84 | 4/5/2025 |
3.0.50 | 105 | 4/5/2025 |
3.0.49 | 79 | 4/5/2025 |
3.0.48 | 93 | 4/5/2025 |
3.0.47 | 78 | 4/5/2025 |
3.0.46 | 81 | 4/5/2025 |
3.0.45 | 79 | 4/5/2025 |
3.0.44 | 127 | 4/5/2025 |
3.0.43 | 85 | 4/5/2025 |
3.0.42 | 101 | 4/5/2025 |
3.0.41 | 76 | 4/5/2025 |
3.0.40 | 77 | 4/4/2025 |
3.0.39 | 99 | 4/4/2025 |
3.0.38 | 384 | 4/4/2025 |
3.0.37 | 198 | 4/4/2025 |
3.0.36 | 147 | 4/4/2025 |
3.0.35 | 149 | 4/4/2025 |
3.0.34 | 159 | 4/4/2025 |
3.0.33 | 250 | 4/3/2025 |
3.0.32 | 151 | 4/3/2025 |
3.0.31 | 169 | 4/1/2025 |
3.0.30 | 135 | 4/1/2025 |
3.0.29 | 207 | 4/1/2025 |
3.0.28 | 136 | 4/1/2025 |
3.0.27 | 134 | 4/1/2025 |
3.0.26 | 217 | 4/1/2025 |
3.0.25 | 244 | 4/1/2025 |
3.0.24 | 139 | 4/1/2025 |
3.0.23 | 200 | 4/1/2025 |
3.0.22 | 139 | 3/31/2025 |
3.0.21 | 134 | 3/31/2025 |
3.0.20 | 142 | 3/31/2025 |
3.0.19 | 143 | 3/31/2025 |
3.0.18 | 288 | 3/31/2025 |
3.0.17 | 165 | 3/29/2025 |
3.0.16 | 84 | 3/29/2025 |
3.0.15 | 91 | 3/29/2025 |
3.0.14 | 91 | 3/29/2025 |
3.0.13 | 84 | 3/29/2025 |
3.0.12 | 77 | 3/29/2025 |
3.0.11 | 253 | 3/27/2025 |
3.0.10 | 512 | 3/26/2025 |
3.0.9 | 459 | 3/26/2025 |
3.0.8 | 470 | 3/25/2025 |
3.0.7 | 494 | 3/25/2025 |
3.0.6 | 457 | 3/25/2025 |
3.0.5 | 457 | 3/25/2025 |
3.0.4 | 465 | 3/25/2025 |
3.0.3 | 462 | 3/25/2025 |
3.0.2 | 421 | 3/23/2025 |
3.0.1 | 110 | 3/21/2025 |