Raycynix.Extensions.Email.Smtp
2.2.0
dotnet add package Raycynix.Extensions.Email.Smtp --version 2.2.0
NuGet\Install-Package Raycynix.Extensions.Email.Smtp -Version 2.2.0
<PackageReference Include="Raycynix.Extensions.Email.Smtp" Version="2.2.0" />
<PackageVersion Include="Raycynix.Extensions.Email.Smtp" Version="2.2.0" />
<PackageReference Include="Raycynix.Extensions.Email.Smtp" />
paket add Raycynix.Extensions.Email.Smtp --version 2.2.0
#r "nuget: Raycynix.Extensions.Email.Smtp, 2.2.0"
#:package Raycynix.Extensions.Email.Smtp@2.2.0
#addin nuget:?package=Raycynix.Extensions.Email.Smtp&version=2.2.0
#tool nuget:?package=Raycynix.Extensions.Email.Smtp&version=2.2.0
Raycynix.Extensions.Email.Smtp
SMTP provider integration for Raycynix.Extensions.Email.
What It Provides
AddSmtp(...)SmtpConfiguration- SMTP provider-specific validation
IEmailSenderimplementation backed by MailKit- optional Microsoft
ILogger<T>diagnostics for SMTP delivery phases
The provider is selected by calling .AddSmtp(...).
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
{
"EmailConfiguration": {
"DefaultFromAddress": "no-reply@example.com",
"DefaultFromDisplayName": "Example App",
"SmtpConfiguration": {
"Host": "smtp.example.com",
"Port": 465,
"SecureSocketOptions": "SslOnConnect",
"Username": "smtp-user",
"Password": "smtp-password",
"TimeoutMilliseconds": 100000
}
}
}
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.17.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Raycynix.Extensions.Configuration (>= 2.2.0)
- Raycynix.Extensions.Configuration.Abstractions (>= 2.2.0)
- Raycynix.Extensions.Email (>= 2.2.0)
- Raycynix.Extensions.Email.Abstractions (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Starts unified versioning for Raycynix packages from this release and adds optional Microsoft.Extensions.Logging diagnostics for SMTP delivery phases.