
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
server-accepts-email
Advanced tools
Check if an SMTP server accepts emails to a given address.
npm install --save server-accepts-email
const serverAcceptsEmail = require('server-accepts-email')
console.log(await serverAcceptsEmail('linus@folkdatorn.se'))
//=> true
console.log(await serverAcceptsEmail('6bJ4zsZHOE@folkdatorn.se'))
//=> false
console.log(await serverAcceptsEmail('linus@gp5uzpn2q7.se'))
//=> false
serverAcceptsEmail(email[, options]) => Promise<boolean>
email
(string, required) - Email address to testoptions
(object, optional)
senderDomain
(string, optional) - Domain to identify as (in HELO
smtp command)senderAddress
(string, optional) - Email address to identify as (in MAIL FROM
command)There are some other libraries that do the same thing, but I found them to have some flaws which made me write this one.
Promise API | Follows RFC5321 1 | Proper Errors 2 | Handles Greylisting 3 | Connection Pooling 4 | |
---|---|---|---|---|---|
server-accepts-email | ✅ | ✅ | ✅ | ✅ | ✅ |
email-exists | ✅ | ❌ | ❌ | ❌ | ❌ |
email-existence | ❌ | ❌ | ❌ | ❌ | ❌ |
email-verify | ❌ | ❌ | ✅ | ❌ | ❌ |
1 None of the other libraries parsed the replies to support multiline replies but instead relied on every reply coming in a chunk, accepting all data and searching for substrings, or something similar.
2 Some of the other libraries rejects, or calls the callback, with something other than an Error
instance.
3 This library detects Greylisting and sends another request after the timeout has passed.
4 This library reuses connections, and limits the number of simultaneous connections to any given host. This is more effecient, and the behaviour more closely matches that of proper SMTP clients, decreasing the chance of being blacklisted.
FAQs
Check if an SMTP server accepts emails to a given address.
The npm package server-accepts-email receives a total of 24 weekly downloads. As such, server-accepts-email popularity was classified as not popular.
We found that server-accepts-email 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.