Pacem.Messaging.Email.Smtp
0.10.17
See the version list below for details.
dotnet add package Pacem.Messaging.Email.Smtp --version 0.10.17
NuGet\Install-Package Pacem.Messaging.Email.Smtp -Version 0.10.17
<PackageReference Include="Pacem.Messaging.Email.Smtp" Version="0.10.17" />
<PackageVersion Include="Pacem.Messaging.Email.Smtp" Version="0.10.17" />
<PackageReference Include="Pacem.Messaging.Email.Smtp" />
paket add Pacem.Messaging.Email.Smtp --version 0.10.17
#r "nuget: Pacem.Messaging.Email.Smtp, 0.10.17"
#:package Pacem.Messaging.Email.Smtp@0.10.17
#addin nuget:?package=Pacem.Messaging.Email.Smtp&version=0.10.17
#tool nuget:?package=Pacem.Messaging.Email.Smtp&version=0.10.17
Email sending services implementation based on:
MailKit SmtpClient
About
Pacem.Messaging.Email.Smtp provides an implementation of IMessagingProvider
that sends email messages using SMTP protocol.
Getting started
Inject the IMessagingProviderFactory singleton service into the DI container,
then extend its capabilities adding SMTP implementation:
services.AddPacemMessaging()
.WithSmtpClient(options => {
// setup configuration
options.Host = "smtp.office365.com";
options.Username = "dnr@foo.com";
options.From = "noreply@baz.net";
options.Port = 587;
options.Password = "password";
options.UseSsl = true;
});
You can then generate a new sending provider by using the dedicated extension method:
// dep injected factory instance
private readonly IMessagingProviderFactory _factory;
private readonly ILogger _logger;
async Task SomeMethodAsync(){
var client = _factory.CreateSmtpClientEmailMessagingProvider();
EmailMessage msg = new EmailMessage
{
Body = "<body>Hello, <b>World</b>!</body>",
To = ["foo@baz.com"],
ReplyTo = "foo@bar.com",
DisplayFrom = "Tester",
Subject = "Test Message",
};
var response = await client.SendMessageAsync(msg);
_logger.LogInformation("Status {status}.", response.Status);
}
You can shortcut it by directly asking the DI for the the default configured IMessagingProvider<EmailMessage>:
// dep injected emailer instance
private readonly IMessagingProvider<EmailMessage> _emailer;
private readonly ILogger _logger;
async Task SomeMethodAsync(){
EmailMessage msg = new EmailMessage
{
// omitted...
};
var response = await _emailer.SendMessageAsync(msg);
_logger.LogInformation("Status {status}.", response.Status);
}
| Product | Versions 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. |
-
net10.0
- MailKit (>= 4.16.0)
- Pacem.Messaging.Abstractions (>= 0.10.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.10.18-selberg | 45 | 10/1/2026 |
| 0.10.18-riemann | 83 | 9/26/2026 |
| 0.10.18-pascal | 86 | 9/21/2026 |
| 0.10.17 | 89 | 9/18/2026 |
| 0.10.17-foucault | 88 | 9/18/2026 |
| 0.10.16 | 83 | 9/16/2026 |
| 0.10.16-hamilton | 78 | 9/14/2026 |
| 0.10.16-gauss | 80 | 9/14/2026 |
| 0.10.16-faraday | 94 | 9/9/2026 |
| 0.10.15 | 96 | 9/7/2026 |
| 0.10.15-euler | 94 | 9/7/2026 |
| 0.10.14 | 97 | 9/6/2026 |
| 0.10.14-dedekind | 106 | 9/6/2026 |
| 0.10.14-cauchy | 96 | 9/5/2026 |
| 0.10.14-boltzmann | 87 | 9/5/2026 |
| 0.10.13 | 110 | 9/3/2026 |
| 0.10.13-abel | 90 | 9/3/2026 |
| 0.10.12 | 85 | 9/3/2026 |
| 0.10.11 | 100 | 8/26/2026 |
| 0.10.10 | 116 | 7/28/2026 |