npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

email-verifier-check

v1.3.0

Published

A simple, zero-dependency email verification library with format validation, DNS checking, and SMTP probing

Readme

Email Verifier

CI

A simple, zero-runtime-dependency email verification library for Node.js. Verify email addresses through format validation, DNS checking, and SMTP probing.

Features

  • Format Validation - RFC 5322 compliant email format checking
  • DNS Verification - MX record lookup with A record fallback
  • SMTP Probing - RCPT TO verification without sending email
  • Catch-all Detection - Identifies domains that accept any email
  • Provider Detection - Identifies mail providers (Google, Microsoft, etc.)
  • Caching - Built-in caching for performance
  • Rate Limiting - Token bucket throttling with exponential backoff
  • Zero Dependencies - Uses only Node.js built-ins at runtime

Installation

npm install email-verifier-check

CLI Usage

# Verify a single email
npx email-verifier-check check [email protected]

# Verify multiple emails
npx email-verifier-check check [email protected] [email protected]

# Output as JSON
npx email-verifier-check check [email protected] --json

# Skip SMTP check (faster, less accurate)
npx email-verifier-check check [email protected] --no-smtp

# Skip catch-all detection
npx email-verifier-check check [email protected] --no-catchall

Programmatic Usage

import { verifyEmail, verifyEmails } from "email-verifier-check";

// Verify a single email
const result = await verifyEmail("[email protected]");

console.log(result);
// {
//   email: '[email protected]',
//   valid: true,
//   confidence: 0.95,
//   details: {
//     formatValid: true,
//     mxRecords: ['aspmx.l.google.com'],
//     smtpStatus: 'accepted',
//     catchAll: false,
//     provider: {
//       name: 'Google Workspace',
//       url: 'https://workspace.google.com'
//     }
//   }
// }

// Verify multiple emails
const results = await verifyEmails(["[email protected]", "[email protected]"]);

Options

interface VerifyOptions {
  // Timeout for DNS lookups in milliseconds (default: 5000)
  dnsTimeout?: number;

  // Timeout for SMTP connections in milliseconds (default: 10000)
  smtpTimeout?: number;

  // Whether to perform SMTP verification (default: true)
  smtpCheck?: boolean;

  // Whether to perform catch-all detection (default: true)
  catchAllCheck?: boolean;

  // The sender email to use in SMTP MAIL FROM (default: [email protected])
  senderEmail?: string;

  // SMTP port to connect to (default: 25)
  smtpPort?: number;
}

// Example with options
const result = await verifyEmail("[email protected]", {
  smtpTimeout: 15000,
  catchAllCheck: false,
});

Understanding Results

Confidence Scores

| Scenario | Valid | Confidence | Meaning | | ------------------------ | ------- | ---------- | ----------------------------- | | Invalid format | false | 0% | Email syntax is invalid | | No DNS records | false | 0% | Domain cannot receive email | | SMTP rejected (5xx) | false | 0% | Mailbox doesn't exist | | SMTP timeout/error | true | 50% | Could be valid, can't confirm | | Accepted + catch-all | true | 60% | Domain accepts any email | | Accepted + NOT catch-all | true | 95% | High confidence valid |

SMTP Status Values

  • accepted - Server returned 2xx to RCPT TO
  • rejected - Server returned 5xx to RCPT TO
  • unknown - Server returned 4xx or connection failed
  • skipped - SMTP check was not performed

Supported Mail Providers

The library automatically detects these mail providers from MX records:

  • Google Workspace
  • Microsoft 365
  • Proofpoint / Proofpoint Essentials
  • Mimecast
  • Yahoo Mail
  • Zoho Mail
  • Fastmail
  • Proton Mail
  • iCloud Mail
  • Amazon SES
  • SendGrid
  • Mailgun
  • Postmark
  • And more...

How It Works

Verification Pipeline

  1. Format Check - Validates email against RFC 5322 pattern
  2. DNS Check - Queries MX records, falls back to A record per RFC 5321
  3. SMTP Probe - Connects to mail server and tests with RCPT TO
  4. Catch-all Detection - Tests with fake x9x0{localpart}@domain

Rate Limiting

The library includes built-in rate limiting to avoid overwhelming mail servers:

  • Token bucket algorithm (10 requests per host, 1/second refill)
  • Exponential backoff on failures (5s initial, 5min max)
  • Automatic recovery after successful requests

Development

# Install dependencies
npm install

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Build
npm run build

# Type check
npm run lint

License

MIT