zb-email-verifier
Advanced tools
Comparing version 0.6.3 to 0.6.4
{ | ||
"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" | ||
} | ||
} |
@@ -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 | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
21405
403
4
9
8
35
3
+ Addeddebug@^4.1.1
+ Addeddebug@4.3.7(transitive)
+ Addedms@2.1.3(transitive)