Soenneker.Cloudflare.EmailRouting
11.0.584
Prefix Reserved
dotnet add package Soenneker.Cloudflare.EmailRouting --version 11.0.584
NuGet\Install-Package Soenneker.Cloudflare.EmailRouting -Version 11.0.584
<PackageReference Include="Soenneker.Cloudflare.EmailRouting" Version="11.0.584" />
<PackageVersion Include="Soenneker.Cloudflare.EmailRouting" Version="11.0.584" />
<PackageReference Include="Soenneker.Cloudflare.EmailRouting" />
paket add Soenneker.Cloudflare.EmailRouting --version 11.0.584
#r "nuget: Soenneker.Cloudflare.EmailRouting, 11.0.584"
#:package Soenneker.Cloudflare.EmailRouting@11.0.584
#addin nuget:?package=Soenneker.Cloudflare.EmailRouting&version=11.0.584
#tool nuget:?package=Soenneker.Cloudflare.EmailRouting&version=11.0.584
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Cloudflare.Utils.Client (>= 11.0.1142)
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 |
|---|---|---|
| 11.0.584 | 0 | 11/15/2026 |
| 11.0.583 | 66 | 11/14/2026 |
| 11.0.582 | 107 | 11/13/2026 |
| 11.0.581 | 116 | 11/12/2026 |
| 11.0.580 | 70 | 11/11/2026 |
| 11.0.579 | 54 | 11/11/2026 |
| 11.0.578 | 72 | 11/11/2026 |
| 11.0.577 | 64 | 11/11/2026 |
| 11.0.576 | 81 | 11/11/2026 |
| 11.0.575 | 56 | 11/11/2026 |
| 11.0.574 | 56 | 11/11/2026 |
| 11.0.573 | 74 | 11/11/2026 |
| 11.0.572 | 60 | 11/11/2026 |
| 11.0.571 | 57 | 11/11/2026 |
| 11.0.570 | 110 | 11/10/2026 |
| 11.0.569 | 320 | 11/8/2026 |
| 11.0.568 | 196 | 11/7/2026 |
| 11.0.567 | 101 | 11/6/2026 |
| 11.0.566 | 266 | 11/5/2026 |
| 11.0.565 | 166 | 11/4/2026 |
Update dependency Soenneker.Cloudflare.Utils.Client to 11.0.1142 (#869)