Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
email-check
Advanced tools
Email check is a npm async module for NodeJS, that checks if an email address exists.
It first validates the email through regex, and then pings the relative MX server.
It works with native JS promises (and needs a JS engine that supports them, like Node >= v4.0.0).
npm install email-check
(add "--save" if you want the module to be automatically added to your project's "package.json" dependencies)
emailCheck(email, [opts])
The function signature accepts two arguments and returns a promise, eventually fulfilled with true
if the email address exists, or false
if it doesn't (please note that if your Internet connection is down, or port 25 is closed – e.g. by a firewall – it will always return false
).
email
(string) the email address to check.opts
(object) the options object.The options object can have three properties:
from
(string) email address originating the request (defaults to the same value as "email").host
(string) fqdn of SMTP server originating the request (defaults to the domain name of the "from" email address).timeout
(number) max allowed idle time in milliseconds (defaults to 5000). If the timeout expires, the promise returns false
.var emailCheck = require('email-check');
// Quick version
emailCheck('mail@example.com')
.then(function (res) {
// Returns "true" if the email address exists, "false" if it doesn't.
})
.catch(function (err) {
if (err.message === 'refuse') {
// The MX server is refusing requests from your IP address.
} else {
// Decide what to do with other errors.
}
});
// With custom options
emailCheck('mail@example.com', {
from: 'address@domain.com',
host: 'mail.domain.com',
timeout: 3000
})
.then(function (res) {
console.log(res);
})
.catch(function (err) {
console.error(err);
});
MIT License
FAQs
Async Node JS module to check if an email address exists
The npm package email-check receives a total of 0 weekly downloads. As such, email-check popularity was classified as not popular.
We found that email-check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.