Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

email-syntax-check

1.1.3 • Public • Published

email-syntax-check

E-Mail address syntax validation module.

logo

version downloads node status

Installation

npm install email-syntax-check

Status

none,official,disposable,free-email,spam-trap,role-based

Usage

const esc = require('email-syntax-check');
 
esc.syntaxCheck("mehmet.kozan@liev.com").then(function(res){
    console.log(res.status);//none
});
 
//enable did you mean
esc.syntaxCheck("mehmet.kozan@liev.com",true).then(function(res){
    console.log(res.did_you_mean);//mehmet.kozan@live.com
    console.log(res.status);//free-email
});
 
esc.syntaxCheck("career@cia.gov").then(function(res){
    console.log(res.status);//official
});
 
esc.syntaxCheck("info@microsoft.com").then(function(res){
    console.log(res.status);//role-based
});
 
esc.syntaxCheck("bouncer@company.com").then(function(res){
    console.log(res.status);//spam-trap
});
 
esc.syntaxCheck("tom@10minutemail.com").then(function(res){
    console.log(res.status);//disposable
});
 

Test

mocha or npm test

check test folder and QUICKSTART.js for extra usage.

Install

npm i email-syntax-check

DownloadsWeekly Downloads

370

Version

1.1.3

License

MIT

Last publish

Collaborators

  • avatar