Raycynix.Extensions.Email.Abstractions
3.0.1
See the version list below for details.
dotnet add package Raycynix.Extensions.Email.Abstractions --version 3.0.1
NuGet\Install-Package Raycynix.Extensions.Email.Abstractions -Version 3.0.1
<PackageReference Include="Raycynix.Extensions.Email.Abstractions" Version="3.0.1" />
<PackageVersion Include="Raycynix.Extensions.Email.Abstractions" Version="3.0.1" />
<PackageReference Include="Raycynix.Extensions.Email.Abstractions" />
paket add Raycynix.Extensions.Email.Abstractions --version 3.0.1
#r "nuget: Raycynix.Extensions.Email.Abstractions, 3.0.1"
#:package Raycynix.Extensions.Email.Abstractions@3.0.1
#addin nuget:?package=Raycynix.Extensions.Email.Abstractions&version=3.0.1
#tool nuget:?package=Raycynix.Extensions.Email.Abstractions&version=3.0.1
Raycynix.Extensions.Email.Abstractions
This package follows the shared version in Directory.Build.props. See CHANGELOG.md for release history.
Contracts and models shared by the Raycynix email packages.
What It Provides
IEmailBuilderIEmailSenderIEmailProviderRegistrationEmailMessageEmailAddressEmailBodyEmailAttachmentEmailSendResult- email send and provider configuration exceptions
Provider Contracts
Provider packages register their own IEmailSender implementation and implement IEmailProviderRegistration to expose provider identity and validate provider-specific settings.
public interface IEmailProviderRegistration
{
string ProviderName { get; }
void Validate(IServiceProvider serviceProvider);
}
EmailSendResult represents expected provider outcomes. Use failures for provider responses such as rejected messages or invalid recipients. Throw EmailSendException when no reliable provider result was produced.
EmailBody is created through factory methods so it always contains sendable content. Sender implementations should call EmailMessage.Validate() before mapping a message to provider-specific APIs.
Subjects and custom headers reject line breaks before provider mapping. Attachment factories return a new stream for each read and honor cancellation before opening content.
EmailSendResult copies and validates provider metadata. Metadata keys must be non-empty and values cannot be null.
Logging
This package contains contracts, models, and exceptions only. Runtime diagnostics belong to the provider packages, so this package does not add a logging dependency.
Usage
Libraries can depend on this package when they only need the sender contract and message models.
public sealed class WelcomeEmailService(IEmailSender emailSender)
{
public Task SendAsync(string address, CancellationToken cancellationToken = default)
{
return emailSender.SendAsync(new EmailMessage
{
To = [new EmailAddress(address)],
Subject = "Welcome",
Body = EmailBody.FromPlainText("Welcome to Raycynix.")
}, cancellationToken);
}
}
| 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
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Raycynix.Extensions.Email.Abstractions:
| Package | Downloads |
|---|---|
|
Raycynix.Extensions.Email
Email provider registration infrastructure with typed Email options, default sender and reply-to resolution, provider selection, validation, and dependency injection support. |
|
|
Raycynix.Extensions.Email.Smtp
MailKit-based SMTP provider for Raycynix email with typed transport options, credential and TLS validation, MIME composition, attachments, and asynchronous delivery. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Raycynix.Extensions 3.0.1. All packages inherit the shared version from Directory.Build.props. See https://github.com/Raycynix/Extensions/blob/HEAD/src/Raycynix.Extensions.Email.Abstractions/CHANGELOG.md for package-specific changes and https://github.com/Raycynix/Extensions/blob/HEAD/CHANGELOG.md for the release overview.