Raycynix.Extensions.Email.Abstractions 2.0.0

dotnet add package Raycynix.Extensions.Email.Abstractions --version 2.0.0
                    
NuGet\Install-Package Raycynix.Extensions.Email.Abstractions -Version 2.0.0
                    
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="Raycynix.Extensions.Email.Abstractions" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raycynix.Extensions.Email.Abstractions" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Raycynix.Extensions.Email.Abstractions" />
                    
Project file
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 Raycynix.Extensions.Email.Abstractions --version 2.0.0
                    
#r "nuget: Raycynix.Extensions.Email.Abstractions, 2.0.0"
                    
#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.
#:package Raycynix.Extensions.Email.Abstractions@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Raycynix.Extensions.Email.Abstractions&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Raycynix.Extensions.Email.Abstractions&version=2.0.0
                    
Install as a Cake Tool

Raycynix.Extensions.Email.Abstractions

Contracts and models shared by the Raycynix email packages.

What It Provides

  • IEmailBuilder
  • IEmailSender
  • IEmailProviderRegistration
  • EmailMessage
  • EmailAddress
  • EmailBody
  • EmailAttachment
  • EmailSendResult
  • 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.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Raycynix.Extensions.Email.Abstractions:

Package Downloads
Raycynix.Extensions.Email.Smtp

MailKit-based SMTP provider integration for Raycynix email, including SMTP configuration binding, validation, and message delivery.

Raycynix.Extensions.Email

Shared email registration infrastructure for Raycynix applications, including provider resolution, typed configuration, and email builder support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 50 6/18/2026

Added email sender, provider registration, builder, message, address, body, attachment, result, and exception abstractions.