You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

email-validator-ultimate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-validator-ultimate

Advanced email validator ultimate library for Node.js. Includes format checks, MX records, SMTP inbox validation, disposable email detection, and quality scoring. email validation email validator

1.0.4
latest
Source
npmnpm
Version published
Weekly downloads
3
-78.57%
Maintainers
1
Weekly downloads
 
Created
Source

📧 email-validator-ultimate

A powerful Node.js email validation library that goes beyond regex.
Performs DNS/MX record checks, SMTP deliverability tests, disposable email detection, and more.

⚠️ Important

If you want to check if an email inbox exists (SMTP/bounce check), make sure:

  • Your server allows outbound port 25 (many hosts block it by default).
  • You provide a valid fromEmail sender (e.g., noreply@yourdomain.com).
  • SMTP check is optional and disabled by default.

🔧 Features

  • Format validation (RFC-compliant)
  • 📮 MX record lookup
  • ✉️ SMTP inbox existence check (optional)
  • 🚫 Disposable email detection
  • 👤 Generic username detection (e.g., admin, info)
  • 💼 Provider and domain info
  • 🔢 Email quality scoring
  • 🆓 Free email provider detection (e.g., Gmail, Yahoo)
  • 💡 Catch-all detection (optional)

📦 Installation

npm install email-validator-ultimate

📦 Installation

Basic Example (ESM)


import { validateEmail } from 'email-validator-ultimate';

const result = await validateEmail({
  email: 'someone@example.com',
  fromEmail: 'noreply@yourdomain.com',
  smtpCheck: true,       // Enable SMTP validation (optional)
  debug: true            // Optional SMTP debug logs
});

console.log(result);


Using with Express (CommonJS)

const { validateEmail } = require('email-validator-ultimate');

app.post('/validate', async (req, res) => {
  const result = await validateEmail({
    email: req.body.email,
    fromEmail: 'noreply@yourdomain.com',
    smtpCheck: true
  });

  res.json(result);
});


✅ Validation Result Example

{
  "email": "someone@example.com",
  "username": "someone",
  "domain": "example.com",
  "formatValid": true,
  "hasMX": true,
  "isDisposable": false,
  "isGeneric": false,
  "isFree": false,
  "provider": "Example",
  "mxRecord": "mx1.example.com",
  "canReceiveEmail": {
    "smtpSuccess": true,
    "message": "SMTP verification passed",
    "catchAll": false
  },
  "qualityScore": 92
}


🧪 Options

OptionTypeRequiredDescription
emailstringEmail address to validate
fromEmailstringEmail sender used for SMTP (if enabled)
smtpCheckbooleanEnable SMTP inbox check (default: false)
debugbooleanLog SMTP conversation to console

🤝 Contributing

Contributions are welcome! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is appreciated.

Please follow these guidelines:

  • Fork the repository and create your branch (git checkout -b feature/your-feature)
  • Commit your changes (git commit -m 'Add some feature')
  • Push to the branch (git push origin feature/your-feature)
  • Open a pull request describing your changes

Make sure your code passes all tests and adheres to the existing style.

📄 License

This project is licensed under the MIT License — see the [LICENSE] file for details.
© 2025

✍️ Author

Mehedi Hasan
📧 aminulislamdev23@gmail.com
🌐 GitHub

🔑 Keywords

Email validation · SMTP check · Disposable email detection · MX record lookup · Catch-all detection · Email format validation · Node.js email validator · Email quality scoring · Generic username detection

Keywords

email validator ultimate

FAQs

Package last updated on 01 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts