Raycynix.Extensions.Email.Smtp
3.1.0
See the version list below for details.
dotnet add package Raycynix.Extensions.Email.Smtp --version 3.1.0
NuGet\Install-Package Raycynix.Extensions.Email.Smtp -Version 3.1.0
<PackageReference Include="Raycynix.Extensions.Email.Smtp" Version="3.1.0" />
<PackageVersion Include="Raycynix.Extensions.Email.Smtp" Version="3.1.0" />
<PackageReference Include="Raycynix.Extensions.Email.Smtp" />
paket add Raycynix.Extensions.Email.Smtp --version 3.1.0
#r "nuget: Raycynix.Extensions.Email.Smtp, 3.1.0"
#:package Raycynix.Extensions.Email.Smtp@3.1.0
#addin nuget:?package=Raycynix.Extensions.Email.Smtp&version=3.1.0
#tool nuget:?package=Raycynix.Extensions.Email.Smtp&version=3.1.0
Raycynix.Extensions.Email.Smtp
This package follows the shared version in Directory.Build.props. See CHANGELOG.md for release history.
SMTP provider integration for Raycynix.Extensions.Email.
What It Provides
AddSmtp(...)SmtpOptions- SMTP provider-specific validation
IEmailSenderimplementation backed by MailKit- optional Microsoft
ILogger<T>diagnostics for SMTP delivery phases
The provider is selected by calling .AddSmtp(...).
SmtpOptions is bound from EmailOptions:SmtpOptions and validated during application startup.
Usage
builder.Services
.AddRaycynixEmail(builder.Configuration, email =>
{
email.DefaultFromAddress = "no-reply@example.com";
email.DefaultFromDisplayName = "Example App";
})
.AddSmtp(smtp =>
{
smtp.Host = "smtp.example.com";
smtp.Port = 465;
smtp.SecureSocketOptions = SmtpSecureSocketOptions.SslOnConnect;
smtp.Username = "smtp-user";
smtp.Password = "smtp-password";
});
Configuration
{
"EmailOptions": {
"DefaultFromAddress": "no-reply@example.com",
"DefaultFromDisplayName": "Example App",
"SmtpOptions": {
"Host": "smtp.example.com",
"Port": 465,
"SecureSocketOptions": "SslOnConnect",
"Username": "smtp-user",
"Password": "smtp-password",
"TimeoutMilliseconds": 100000
}
}
}
Migrating From 2.x
- Replace
SmtpConfigurationwithSmtpOptions. - Replace the
Raycynix.Extensions.Email.Smtp.Configurationsnamespace withRaycynix.Extensions.Email.Smtp.Options. - Rename the configuration path from
EmailConfiguration:SmtpConfigurationtoEmailOptions:SmtpOptions.
Logging
The SMTP provider uses optional Microsoft ILogger<T> diagnostics when logging is registered in the application. No Raycynix logging provider is required.
Diagnostics cover configuration validation, MIME message composition counts, connection, authentication, send, disconnect, and provider failures. Message bodies, subjects, recipient addresses, attachment file names, usernames, passwords, and other credential values are not logged.
| 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.18.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Raycynix.Extensions.Configuration (>= 3.1.0)
- Raycynix.Extensions.Configuration.Abstractions (>= 3.1.0)
- Raycynix.Extensions.Email (>= 3.1.0)
- Raycynix.Extensions.Email.Abstractions (>= 3.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Raycynix.Extensions 3.1.0. All packages inherit the shared version from Directory.Build.props. See https://github.com/raycynix/Raycynix.Extensions/blob/HEAD/src/Raycynix.Extensions.Email.Smtp/CHANGELOG.md for package-specific changes and https://github.com/raycynix/Raycynix.Extensions/blob/HEAD/CHANGELOG.md for the release overview.