Socket
Socket
Sign inDemoInstall

zb-email-verifier

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zb-email-verifier - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

dist/index.d.ts

20

package.json
{
"name": "zb-email-verifier",
"description": "Promise-based library for verify an email address existence via SMTP",
"version": "0.6.3",
"version": "0.6.4",
"author": {

@@ -18,3 +18,4 @@ "name": "ZIGBANG",

"license": "MIT",
"main": "index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {

@@ -27,2 +28,3 @@ "type": "git",

"bluebird": "^3.5.5",
"debug": "^4.1.1",
"lodash": "^4.17.15",

@@ -32,7 +34,17 @@ "randomstring": "^1.1.5"

"devDependencies": {
"mocha": "^6.2.0"
"@testdeck/jest": "^0.0.6",
"@types/bluebird": "^3.5.29",
"@types/debug": "^4.1.5",
"@types/jest": "^24.0.23",
"@types/lodash": "^4.14.149",
"@types/randomstring": "^1.1.6",
"jest": "^24.9.0",
"ts-jest": "^24.2.0",
"typescript": "^3.7.3"
},
"scripts": {
"test": "mocha"
"prepare": "npm run build",
"build": "tsc",
"test": "jest"
}
}

47

README.md

@@ -10,32 +10,27 @@ # zb-email-verifier

## Usage
```javascript
const zbEmailVerifier = require('zb-email-verifier');
import { verify } from "zb-email-verifier"
const helo = 'yourdomain.com';
const from = 'youremail@example.org';
const checkEmail = 'check@example.org';
const result = await verify({
helo: "yourdomain.com",
from: "youremail@example.org",
to: "check@example.org",
catchalltest: true, // default false
timeout: 1500 // default 5000
})
zbEmailVerifier.verify({
helo: helo,
from: from,
to: checkEmail,
debug: false, // default false
catchalltest : true, // default false
timeout: 1500 // default 5000
}).then(result => {
console.log(result);
// INVALID - email regexp validation failed
// EXIST - email is exist
// NOT_EXIST - email does not exist
// CATCH_ALL - catch all smtp server
// INVALID - email regexp validation failed
// EXIST - email is existence
// NOT_EXIST - email is not existence
// CATCH_ALL - catch all smtp server
// 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
});
// MXRECORD_FAIL - resolve mx record fail
// MXRECORD_TIMEOUT - resolve mx record timeout
// CONN_FAIL - connect fail smtp
// CONN_TIMEOUT - connect timeout smtp
// VERIFY_FAIL
// VERIFY_TIMEOUT
// UNKNOWN
// UNKNOWN_TIMEOUT
```
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