Sparkdo.Communication.Email 2.0.0-preview.2

This is a prerelease version of Sparkdo.Communication.Email.
dotnet add package Sparkdo.Communication.Email --version 2.0.0-preview.2
                    
NuGet\Install-Package Sparkdo.Communication.Email -Version 2.0.0-preview.2
                    
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="Sparkdo.Communication.Email" Version="2.0.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Communication.Email" Version="2.0.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.Communication.Email" />
                    
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 Sparkdo.Communication.Email --version 2.0.0-preview.2
                    
#r "nuget: Sparkdo.Communication.Email, 2.0.0-preview.2"
                    
#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 Sparkdo.Communication.Email@2.0.0-preview.2
                    
#: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=Sparkdo.Communication.Email&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.Communication.Email&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Tool

Sparkdo.Communication.Email

Email 通道路由与 Provider 运行时。SparkdoEmailOptions 支持默认和命名 Profile,每个 Profile 配置一个有序 Provider 链以及各 Provider 的强类型选项。

Provider 返回 Unavailable 或 RateLimited 时会继续尝试下一个 Provider;返回 Rejected、Unknown 或 Accepted 时停止。未配置 Provider 会在发送前明确失败。

第三方 Provider 实现 IEmailProvider 并在自己的 Manifest 中追加注册:

public sealed class AppEmailProvider : IEmailProvider
{
    public string Name => "app-email";
    public EmailProviderFeatures Features => EmailProviderFeatures.Text;

    public void Validate(EmailProviderRequest request)
    {
    }

    public ValueTask<ProviderSubmissionResult> SubmitAsync(
        EmailProviderRequest request,
        CancellationToken cancellationToken = default) =>
        ValueTask.FromResult(ProviderSubmissionResult.Accepted());
}

需要接入外部文本模板产品域时,实现并注册 IEmailContentResolver,无需修改 Communication 核心。

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 (1)

Showing the top 1 NuGet packages that depend on Sparkdo.Communication.Email:

Package Downloads
Sparkdo.Communication.Email.Smtp

Sparkdo Communication Email 的 SMTP Provider。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.2 85 7/20/2026