
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.
simple-mail-smtp
Advanced tools
A straightforward Node.js library that enables you to launch your own native incoming SMTP server, effortlessly.
SimpleMail is a straightforward Node.js library that enables you to launch your own native incoming SMTP server, effortlessly.
To get started with launching your SMTP server, you'll need to initialize it and specify a port.
Additionally, you'll need to provide a callback function using the catch()
method. This function will be invoked whenever a new email is received to your SMTP server.
const SimpleMail = require('simple-mail-smtp');
const server = new SimpleMail();
const port = 25;
function myFunction(parsed) {
console.log('Email from ' + parsed.from.text + '!');
}
server.catch(myFunction);
// Start your SMTP server at port 25 (default)
server.listen(port, (serverIP) => {
console.log(`SMTP server started at ${serverIP}:${port}`)
// other logic
});
After running this command, your SMTP server will successfully start at the specified port. All emails will automatically be parsed with simpleParser and your function will be invoked.
By default, all emails received by your SMTP server will be automatically checked for DKIM verification. However, you may override this setting by using the verifyDKIM()
function.
server.verifyDKIM(false); // DANGER: All incoming emails will be passed through your SMTP server
By overriding this function, all incoming emails will not be scanned for valid DKIM verification, and will cause an invoke of your callback function. DANGER ZONE!
FAQs
A straightforward Node.js library that enables you to launch your own native incoming SMTP server, effortlessly.
The npm package simple-mail-smtp receives a total of 0 weekly downloads. As such, simple-mail-smtp popularity was classified as not popular.
We found that simple-mail-smtp 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.