EnterpriseEmailValidator 1.0.3

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package EnterpriseEmailValidator --version 1.0.3
                    
NuGet\Install-Package EnterpriseEmailValidator -Version 1.0.3
                    
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="EnterpriseEmailValidator" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EnterpriseEmailValidator" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="EnterpriseEmailValidator" />
                    
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 EnterpriseEmailValidator --version 1.0.3
                    
#r "nuget: EnterpriseEmailValidator, 1.0.3"
                    
#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 EnterpriseEmailValidator@1.0.3
                    
#: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=EnterpriseEmailValidator&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=EnterpriseEmailValidator&version=1.0.3
                    
Install as a Cake Tool

📧 EmailValidator

Lightweight, high-performance email validation library for .NET.

This package validates email addresses using:

  • ✔ RFC-compliant syntax validation
  • ✔ IDN (International Domain Name) support
  • ✔ MX record lookup (via DnsClient)
  • ✔ A-record fallback check
  • ✔ Role-based email detection
  • ✔ Thread-safe mail server caching

Designed for backend services, APIs, SaaS platforms, and enterprise systems that need reliable email validation beyond simple regex checks.


✨ Features

1️⃣ Syntax Validation

  • RFC-compliant email format validation
  • Local-part length enforcement (max 64 chars)
  • Domain length enforcement (max 255 chars)
  • Unicode domain normalization using IdnMapping

2️⃣ Role-Based Email Detection

Prevents use of common role-based addresses such as:

  • admin@
  • support@
  • info@
  • sales@
  • contact@
  • billing@
  • postmaster@
  • webmaster@
  • noreply@
  • security@

3️⃣ Mail Server Verification

Uses DnsClient to verify that the domain can receive email:

  • MX record lookup
  • A record fallback if no MX exists
  • Thread-safe caching of lookup results
  • Configured DNS timeout and retry control

4️⃣ Thread-Safe Performance

  • Uses ConcurrentDictionary for DNS caching

  • DNS client configured with:

    • 5-second timeout
    • 1 retry
    • Internal DNS caching enabled
  • Safe for high-concurrency environments


📦 Installation

dotnet add package EmailValidator

🛠 Basic Usage

string reason;

if (EmailValidator.Core.EmailValidator.IsValid("admin@example.com", out reason))
{
    Console.WriteLine("Valid email");
}
else
{
    Console.WriteLine("Invalid: " + reason);
}

🔍 Validation Flow

The validator performs checks in this order:

  1. Empty check
  2. Syntax validation (RFC + IDN normalization)
  3. Role-based account detection
  4. DNS MX lookup
  5. A-record fallback

If any check fails, validation stops immediately and returns a failure reason.


📊 Example Failure Reasons

  • Email is empty
  • Invalid email format
  • Role-based email address
  • Domain does not accept mail

⚠ Important Notes

  • DNS-based validation does NOT guarantee mailbox existence.
  • Some domains accept all mail (catch-all configuration).
  • Port 25 SMTP probing is NOT performed.
  • Validation depends on DNS availability.
  • Some providers may temporarily block frequent DNS queries.

🏢 Designed For

  • SaaS platforms
  • Enterprise APIs
  • User registration systems
  • Account verification workflows
  • CRM systems
  • Lead validation pipelines

📦 Dependencies

  • DnsClient

📝 License

MIT License


Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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