email-validator-ultimate
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

📧 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

Option Type Required Description
email string Email address to validate
fromEmail string Email sender used for SMTP (if enabled)
smtpCheck boolean Enable SMTP inbox check (default: false)
debug boolean Log 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

Package Sidebar

Install

npm i email-validator-ultimate

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

45.8 kB

Total Files

33

Last publish

Collaborators

  • ai-mehedi