Skip to content

benadamstyles/email-deep-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

email-deep-validator

Build Status

Verify email address checking MX records, and SMTP connection.

Installation

Install the module through NPM:

$ npm install email-deep-validator --save

Requires Node 6 or above

Examples

Include the module, create a new EmailValidator object and call validate method:

const EmailValidator = require('email-deep-validator');

const emailValidator = new EmailValidator();
emailValidator.validate('foo@email.com')
  .then(() => console.log('Email is valid.');

emailValidator.validate('non-existent@email.com')
  .catch(err => console.log('Email is not valid', err.message));

Configuration options

timeout

Set a timeout in seconds for the smtp connection. Default: 10000.

verifyMxRecords

Enable or disable the check of mx records. Default: true.

verifySmtpConnection

Enable or disable the SMTP check. Default true.

Testing

$ npm test

Contributing

This module was originally written to be used with Conversio and is used in a production environment currently. This will ensure that this module is well maintained, bug free and as up to date as possible.

Conversio's developers will continue to make updates as often as required to have a consistently bug free platform, but we are happy to review any feature requests or issues and are accepting constructive pull requests.

About

Verify email address checking MX records, and SMTP connection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%