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
<PackageReference Include="Soenneker.Cloudflare.EmailRouting" Version="4.0.525" />
<PackageVersion Include="Soenneker.Cloudflare.EmailRouting" Version="4.0.525" />
<PackageReference Include="Soenneker.Cloudflare.EmailRouting" />
paket add Soenneker.Cloudflare.EmailRouting --version 4.0.525
#r "nuget: Soenneker.Cloudflare.EmailRouting, 4.0.525"
#:package Soenneker.Cloudflare.EmailRouting@4.0.525
#addin nuget:?package=Soenneker.Cloudflare.EmailRouting&version=4.0.525
#tool nuget:?package=Soenneker.Cloudflare.EmailRouting&version=4.0.525
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 | 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
- Soenneker.Cloudflare.Utils.Client (>= 4.0.1062)
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 |
Updated Soenneker.Cloudflare.Utils.Client to 4.0.1062