Socket
Socket
Sign inDemoInstall

deep-email-validator

Package Overview
Dependencies
497
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    deep-email-validator

Validates emails based on regex, common typos, disposable email blacklists, DNS records and SMTP server response.


Version published
Weekly downloads
15K
increased by4.9%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Email Validator

Validates emails based on regex, common typos, disposable email blacklists, DNS records and SMTP server response.

  • Validates email is compliant with basic email format using regex.
  • Validates common typos e.g. example@gmaill.com.
  • Validates email was not generated by disposable email service.
  • Validates MX records are present on DNS.
  • Validates SMTP server is running.
  • Validates mailbox exists on SMTP server.
  • Native typescript support.

Getting Started

Install like so

yarn add deep-email-validator

Use like so

import validate from 'deep-email-validator'
const main = async () => {
  let res = await validate('asdf@gmail.com')
  // {
  //   "valid": false,
  //   "reason": "smtp",
  //   "validators": {
  //       "regex": {
  //         "valid": true
  //       },
  //       "typo": {
  //         "valid": true
  //       },
  //       "disposable": {
  //         "valid": true
  //       },
  //       "mx": {
  //         "valid": true
  //       },
  //       "smtp": {
  //         "valid": false,
  //         "reason": "Invalid Mailbox",
  //       }
  //   }
  // }

  // Can also be called with these options
  await validate({
    email: 'name@example.org',
    sender: 'name@example.org',
    validateRegex: true,
    validateMx: true,
    validateTypo: true,
    validateDisposable: true,
    validateSMTP: true,
  })
}

Keywords

FAQs

Last updated on 27 Mar 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc