Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smtp-email-verifier

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smtp-email-verifier

An package to interrogate SMTP servers to see if an email exists

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Email Validator

How It Works

In laymen, it connects to the server where the email address exists and tries to ask it if it has a record of it. If so it will return something like this:

Successful 
{   
    email: "kyle@gmail.com,           
    mx_priority_1: "gmail-smtp-in.l.google.com",
    mx_isValid: true
}

Error
{
    email: "kyle@gmail.com"
    error: <error object>
}

Not every server will cooperate but most will. Most notably I've run into issues with redhat.com

Contributing

If there is an issue or you think it needs a new feature, feel free to open an issue or PR.

Example

const { validate } = require('email-validator')

(async ()  => {

    let isEmailValid = null

    try {  
                                        // Verbose and timeout defaults; Mot needed to use the method. 
        isEmailValid = await validate({email: "kyle@gmail.com", verbose: true, timeout: 2000})
        
    } catch(e) {

        // handle invalid email / error
        
    }

})()

Keywords

FAQs

Package last updated on 10 Sep 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc