Soenneker.Validators.Email.Disposable.Online 4.0.5500

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

Downloads a disposable-domain list once and checks email domains against it without sending email addresses to the source.

Install

dotnet add package Soenneker.Validators.Email.Disposable.Online

Registration

using Soenneker.Validators.Email.Disposable.Online.Registrars;
using Microsoft.Extensions.DependencyInjection;

services.AddEmailDisposableOnlineValidatorAsSingleton();

Only singleton registration is provided. The validator owns one lazily initialized domain set and a named client entry in the shared HTTP client cache.

Configure the list source

{
  "Validators": {
    "Email": {
      "Disposable": {
        "Uri": "https://example.test/disposable-domains.json"
      }
    }
  }
}

The endpoint must return a JSON array of domain strings. When the setting is absent, the validator uses the disposable/disposable-email-domains domains.json file on GitHub. The URI is application configuration and should not be populated directly from request input.

Warm up and validate

using Soenneker.Validators.Email.Disposable.Online.Abstract;

await validator.WarmUp(cancellationToken);

bool? accepted = await validator.Validate(
    "person@example.com",
    cancellationToken);

Warm-up is optional; the first validation downloads the same data if needed. The download is cached for the lifetime of the validator and is not periodically refreshed.

Results have three states:

  • false: the extracted domain is in the downloaded list;
  • true: the domain is not listed, or the input has no extractable domain;
  • null: the endpoint returned an empty domain list.

Domain matching is ordinal and case-insensitive. It is an exact lookup: listed parent domains do not automatically match subdomains. The utility extracts text after the last @; it does not validate email syntax, trim input, normalize internationalized domains, or verify deliverability. Use a syntax validator before this one when malformed input must be rejected.

Network and failure behavior

The list request is retried three times after the initial attempt. HTTP failures, non-success responses after retries, invalid JSON, cancellation, and unexpected response shapes propagate rather than returning null. A true result means only that the domain was absent from this downloaded snapshot.

The configured list service receives only a GET for its domain data; email addresses are not sent to it. The validator no longer includes the checked address in its empty-list warning.

Disposal removes the validator's named client entry from the shared client cache and disposes the lazy domain holder. Let dependency injection dispose the singleton at application shutdown.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.5500 0 9/8/2026
4.0.5499 0 9/8/2026
4.0.5498 0 9/8/2026
4.0.5497 0 9/8/2026
4.0.5496 0 9/8/2026
4.0.5495 0 9/8/2026
4.0.5494 0 9/8/2026
4.0.5491 0 9/7/2026
4.0.5490 22 9/7/2026
4.0.5489 26 9/7/2026
4.0.5488 27 9/7/2026
4.0.5487 30 9/7/2026
4.0.5486 50 9/6/2026
4.0.5485 48 9/5/2026
4.0.5484 45 9/5/2026
4.0.5483 46 9/5/2026
4.0.5481 47 9/5/2026
4.0.5480 43 9/5/2026
4.0.5478 49 9/5/2026
4.0.5477 42 9/4/2026
Loading failed

Update dependency Soenneker.Extensions.HttpClient to 4.0.4029 (#6029)