Soenneker.Cloudflare.EmailRouting 4.0.525

Prefix Reserved
dotnet add package Soenneker.Cloudflare.EmailRouting --version 4.0.525
                    
NuGet\Install-Package Soenneker.Cloudflare.EmailRouting -Version 4.0.525
                    
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="Soenneker.Cloudflare.EmailRouting" Version="4.0.525" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Cloudflare.EmailRouting" Version="4.0.525" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Cloudflare.EmailRouting" />
                    
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 Soenneker.Cloudflare.EmailRouting --version 4.0.525
                    
#r "nuget: Soenneker.Cloudflare.EmailRouting, 4.0.525"
                    
#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 Soenneker.Cloudflare.EmailRouting@4.0.525
                    
#: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=Soenneker.Cloudflare.EmailRouting&version=4.0.525
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Cloudflare.EmailRouting&version=4.0.525
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Cloudflare.EmailRouting

Manages Cloudflare Email Routing destination addresses, forwarding rules, and zone DNS setup.

Installation

dotnet add package Soenneker.Cloudflare.EmailRouting

Configuration

{
  "Cloudflare": {
    "ApiKey": "your-api-token"
  }
}

Use a scoped API token with the account- and zone-level Email Routing permissions required by the operations your application performs.

Registration

using Soenneker.Cloudflare.EmailRouting.Registrars;

services.AddCloudflareEmailRoutingUtilAsScoped();

The scoped utility shares the singleton Cloudflare client utility. Singleton registration is also available.

Enabling routing and creating an address

using Soenneker.Cloudflare.EmailRouting.Abstract;

bool enabled = await emailRouting.SetupEmailRoutingDns(zoneId, cancellationToken);

if (!enabled)
    throw new InvalidOperationException("Cloudflare did not enable Email Routing.");

await emailRouting.CreateCustomAddressWithEmail(
    accountId,
    zoneId,
    "support@example.com",
    "team@example.net",
    cancellationToken);

CreateCustomAddressWithEmail searches all destination-address pages, creates the destination when it does not exist, and then creates an enabled literal forwarding rule. Cloudflare may require the destination owner to complete verification before mail can be delivered.

Use CreateCustomAddress when the destination address has already been added. The forwarding action uses the destination email address; removal methods require Cloudflare's destination-address ID or routing-rule ID, not an email address.

Listing and removal

EmailDestinationAddressesResponseCollection? destinations =
    await emailRouting.ListDestinationAddresses(accountId, cancellationToken);

EmailRulesResponseCollection? rules =
    await emailRouting.ListRoutingRules(zoneId, cancellationToken);

Destination listing aggregates every Cloudflare page. Routing-rule listing returns the generated API response directly and may be paginated according to Cloudflare's endpoint defaults.

DisableEmailRouting changes zone-level routing/DNS state and should only be used when mail delivery for the zone is intentionally being disabled. The setup/disable boolean methods log failures and return false; caller-requested cancellation is propagated. Other API methods return generated nullable responses and allow Kiota/API exceptions to propagate.

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 Soenneker.Cloudflare.EmailRouting:

Package Downloads
Soenneker.Cloudflare.OpenApi.Suite

A dependency-injection registration bundle for selected Cloudflare OpenAPI utilities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.525 54 10/1/2026
4.0.524 83 9/29/2026
4.0.523 54 9/29/2026
4.0.522 304 9/26/2026
4.0.521 112 9/26/2026
4.0.520 88 9/25/2026
4.0.519 89 9/25/2026
4.0.518 129 9/25/2026
4.0.517 93 9/24/2026
4.0.516 132 9/24/2026
4.0.515 219 9/17/2026
4.0.514 104 9/17/2026
4.0.513 125 9/16/2026
4.0.512 118 9/16/2026
4.0.511 147 9/15/2026
4.0.510 227 9/13/2026
4.0.509 131 9/13/2026
4.0.508 134 9/13/2026
4.0.507 109 9/13/2026
4.0.506 164 9/12/2026
Loading failed

Updated Soenneker.Cloudflare.Utils.Client to 4.0.1062