npm install zb-email-verifier --save
const zbEmailVerifier = require('zb-email-verifier');
const helo = 'yourdomain.com';
const from = '[email protected]';
const checkEmail = '[email protected]';
zbEmailVerifier.verify({
helo: helo,
from: from,
to: checkEmail,
debug: false,
timeout: 1500
}).then(result => {
console.log(result);
// INVALID - email regexp validation failed
// EXIST - email is existence
// NOT_EXIST - email is not existence
// MXRECORD_TIMEOUT - resolve mx record timeout
// MXRECORD_FAIL - resolve mx record fail
// CONN_FAIL - connect fail smtp
// CONN_TIMEOUT - connect timeout smtp
// VERIFY_TIMEOUT
// VERIFY_FAIL
// UNKNOWN
});