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

v1.0.2

Published

Enterprise standard email intelligence - MX, SPF, DMARC, disposable, and public provider checks.

Readme

npm version npm downloads License: MIT


This library is primarily focused on checking if an email is valid, checking if it's a temp/disposable email, and inferring the underlying email provider (e.g. Google Workspace, Microsoft 365, Zoho) with deep DNS analysis.

Features

  • Email Validation: Real-time MX record resolution to check if the domain can actually receive emails.
  • Disposable Email Detection: Checks domains against an automatically updated daily list of thousands of disposable/temp email services (like 10minutemail, GuerrillaMail).
  • Provider Inference: Identifies enterprise security gateways and providers like Proofpoint, Mimecast, Google Workspace, Microsoft 365, Zoho, etc.
  • Domain Classification: Intelligently classifies domains into Education, Government, Organization, Public Webmail, or Business based on TLDs and regex.
  • Isomorphic: Works flawlessly in the backend (Node.js) and the frontend (Browsers) out of the box.

📊 Intelligence Report Schema

When you analyze an email address (e.g., [email protected]), the library returns a comprehensive intelligence report. Here is the data dictionary and an example of the return values:

| Field | Type | Example Value | Description | |---|---|---|---| | email | string | "[email protected]" | The email address that was analyzed. | | domain | string | "itshivam.in" | The extracted domain. | | valid | boolean | true | True if the domain has MX records and is not disposable. | | provider | string | "Zoho Mail" | The detected email provider behind the domain. | | type | string | "Business" | Categorization (e.g., Business, Public Webmail, Education). | | mx / spf / dmarc | boolean | true | True if the respective DNS security records were found. | | disposable | boolean | false | True if the domain belongs to a temporary/burn-after-reading email service. | | risk | string | "low" | Assessed risk level (low, medium, high) based on the score. | | score | number | 100 | A score out of 100 indicating the trustworthiness of the email address. |

Installation

npm install email-intel

Integration Guide

1. Backend Integration (Node.js)

In your Node.js backend (e.g., Express, NestJS), you can use email-intel to block signups from disposable emails or validate that an email's domain actually exists before saving it to your database.

import { analyze } from 'email-intel';
import express from 'express';

const app = express();
app.use(express.json());

app.post('/register', async (req, res) => {
  const { email } = req.body;

  try {
    const report = await analyze(email);

    // 1. Check if the email domain is valid (has MX records)
    if (!report.valid) {
      return res.status(400).json({ error: "Invalid email domain. Please provide a real email." });
    }

    // 2. Check if the email is a disposable/temp email
    if (report.disposable) {
      return res.status(400).json({ error: "Disposable emails are not allowed." });
    }

    // 3. Optional: Block free public webmails if you only want B2B users
    if (report.type === "Public Webmail") {
      return res.status(400).json({ error: "Please use your company email address." });
    }

    // Proceed with registration...
    res.json({ message: "Registration successful!", data: report });

  } catch (error) {
    res.status(500).json({ error: "Email validation failed." });
  }
});

2. Frontend Integration (React / Next.js / Vue)

You can also use email-intel directly in the browser! When run in the browser, it seamlessly falls back to Google's DNS-over-HTTPS (DoH) API to resolve DNS records without requiring a backend.

This is perfect for providing instant feedback to users as they type.

import React, { useState } from 'react';
import { analyze, EmailIntelResult } from 'email-intel';

export default function SignupForm() {
  const [email, setEmail] = useState('');
  const [error, setError] = useState('');
  const [loading, setLoading] = useState(false);

  const handleBlur = async () => {
    if (!email.includes('@')) return;
    
    setLoading(true);
    setError('');
    
    try {
      const report: EmailIntelResult = await analyze(email);
      
      // Instantly warn the user if the domain is invalid
      if (!report.valid) {
        setError('This email domain does not appear to exist.');
      } 
      // Warn them if they are using a temporary email
      else if (report.disposable) {
        setError('Please use a real, permanent email address.');
      }
    } catch (err) {
      console.error(err);
    } finally {
      setLoading(false);
    }
  };

  return (
    <form>
      <input 
        type="email" 
        value={email}
        onChange={(e) => setEmail(e.target.value)}
        onBlur={handleBlur} // Validate when user leaves the input field
        placeholder="Enter your email"
      />
      {loading && <span>Verifying...</span>}
      {error && <span style={{ color: 'red' }}>{error}</span>}
      
      <button disabled={!!error || loading}>Sign Up</button>
    </form>
  );
}

CLI Usage

You can also use the package globally as a CLI tool:

npm install -g email-intel

email-intel [email protected]

This will output a nice, formatted intelligence report in your terminal!