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-reachable

v1.0.0

Published

Verify email address reachability using SMTP protocol without sending emails

Readme

email-reachable

Verify email address reachability using SMTP protocol without sending emails.

Features

  • SMTP Verification: Connects to mail servers and verifies mailbox existence
  • Catch-All Detection: Identifies domains that accept all email addresses
  • MX Record Lookup: Discovers and prioritizes mail servers
  • Syntax Validation: RFC-compliant email syntax checking
  • Disposable Domain Detection: Identifies temporary email providers
  • No External Services: All verification done locally via SMTP

Installation

npm install email-reachable

CLI Usage

# Basic usage
npx email-reachable [email protected]

# JSON output
npx email-reachable [email protected] --json

# Debug mode
npx email-reachable [email protected] --debug

# Custom timeout
npx email-reachable [email protected] --timeout=15000

CLI Output

[email protected]
  Reachable: true
  Reason: valid
  Syntax Valid: true
  Disposable: false
  Catch-All: false
  MX Records: mx1.example.com, mx2.example.com
  SMTP Response: 250 OK
  Duration: 1234ms

Exit Codes

  • 0: Email is reachable
  • 1: Email is not reachable or error occurred

Library Usage

import { verifyEmail } from 'email-reachable';

const result = await verifyEmail('[email protected]');

console.log(result);
// {
//   email: '[email protected]',
//   reachable: true,
//   reason: 'valid',
//   syntax: true,
//   disposable: false,
//   catchAll: false,
//   mxRecords: [{ exchange: 'mx1.example.com', priority: 10 }],
//   smtpResponse: { code: 250, message: 'OK', command: 'RCPT TO' },
//   duration: 1234
// }

Options

import { verifyEmail } from 'email-reachable';

const result = await verifyEmail('[email protected]', {
  timeout: 15000,           // Connection timeout in ms (default: 10000)
  senderDomain: 'mydomain.com',  // HELO domain (default: 'verify.local')
  senderAddress: '[email protected]',  // MAIL FROM address
  port: 25,                 // SMTP port (default: 25)
  debug: true,              // Enable debug output
});

Utility Functions

import {
  getMxRecords,
  extractDomain,
  extractLocalPart,
  isValidSyntax,
  isDisposableDomain,
} from 'email-reachable';

// Get MX records for a domain
const mxRecords = await getMxRecords('example.com');
// [{ exchange: 'mx1.example.com', priority: 10 }]

// Extract domain from email
const domain = extractDomain('[email protected]');
// 'example.com'

// Extract local part
const localPart = extractLocalPart('[email protected]');
// 'user'

// Validate syntax
const isValid = isValidSyntax('[email protected]');
// true

// Check for disposable domain
const isDisposable = isDisposableDomain('mailinator.com');
// true

Verification Result

| Field | Type | Description | |-------|------|-------------| | email | string | The email address that was verified | | reachable | boolean | Whether the email appears reachable | | reason | VerificationReason | Reason for the result | | syntax | boolean | Whether email syntax is valid | | disposable | boolean | Whether domain is a known disposable provider | | catchAll | boolean \| null | Whether domain accepts all addresses | | mxRecords | MxRecord[] | Discovered MX records | | smtpResponse | SmtpResponse | Last SMTP response received | | duration | number | Verification time in milliseconds |

Verification Reasons

| Reason | Description | |--------|-------------| | valid | Email appears valid and reachable | | invalid_syntax | Email address syntax is invalid | | no_mx_records | Domain has no MX records | | smtp_connection_failed | Could not connect to any mail server | | mailbox_not_found | Mail server rejected the recipient | | catch_all_domain | Domain accepts all addresses (can't verify) | | smtp_error | SMTP protocol error | | timeout | Connection or command timeout | | blocked | Mail server blocked verification attempt |

How It Works

  1. Syntax Validation: Checks RFC-compliant email format
  2. MX Lookup: Discovers mail servers via DNS
  3. SMTP Connection: Connects to highest priority MX server
  4. HELO/EHLO: Initiates SMTP conversation
  5. MAIL FROM: Sets sender address
  6. RCPT TO: Tests if recipient is accepted
  7. Catch-All Detection: Tests random address to detect catch-all

Limitations

  • Some mail servers may block verification attempts
  • Catch-all domains can't have individual addresses verified
  • Greylisting may cause false negatives
  • Rate limiting may apply on some servers
  • Port 25 may be blocked on some networks

Requirements

  • Node.js >= 18.0.0
  • Port 25 outbound access (SMTP)

License

MIT