Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

email-chk

brandon93s12MIT1.0.2

Check if an email exists

email, check email, verify email, email exists, is real email, email is real

readme

email-chk Build Status

Checks if an email is valid & real by contacting the associated remote mail server :email:

See email-chk-cli for the command-line tool.

Install

$ npm install --save email-chk

Usage

const emailChk = require('email-chk')

try {
  const exists = await emailChk('test@example.com')
} 
catch (e) {
  // connection refused or server error occurred
}

// or
emailChk('test@example.com')
  .then(console.log)
  .catch(console.error)

API

emailChk(email [,options])

Returns a boolean representing if the email is valid & real

email

Type: string

The email to verify and check existence for

options

timeout

Type: number
Default: 5000

The idle timeout in ms for the socket performing requests

host

Type: string
Default: domain of email

The domain of the originating SMTP server for the request

from

Type: string
Default: email

The originating email for the request

License

MIT © Brandon Smith