
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Canonical URL:
https://alexstevovich.com/a/mailchan-nodejs
Software URL:
https://midnightcitylights.com/software/mailchan-nodejs
A simple and flexible SMTP email sender built on Nodemailer. MailChan allows for sending emails with SMTP credentials and also features dry-run mode for logging email activity without sending them.
npm install mailchan
import { MailChan } from 'mailchan';
const mail = new MailChan('gmail', 'your-email@gmail.com', 'your-password');
// Send an email
mail.send('recipient@example.com', 'Test Subject', 'This is a test email.')
.then((response) => {
console.log('Email sent:', response);
})
.catch((error) => {
console.error('Error sending email:', error);
});
// Enable dry-run mode (no email will be sent, but it will be logged to console)
mail.dryRun(true);
// Test SMTP connection
mail.verify()
.then(() => console.log('SMTP connection verified successfully'))
.catch((error) => console.error('SMTP verification failed:', error));
MailChan(service, user, pass, options)Constructor
Creates an instance of the MailChan class with SMTP configuration.
service (string): The SMTP service (e.g., "gmail").user (string): SMTP username (typically your email address).pass (string): SMTP password or app-specific token.options (object, optional):
dryRun (boolean, optional): If true, the emails are not sent but logged to the console (default is false).verify(options)Method
Verifies the SMTP connection and credentials.
options.throw (boolean, optional): If true, an error will be thrown on failure (default is false).send(to, subject, text, fromOverride)Method
Sends a plain-text email.
to (string | string[]): The recipient(s) of the email.subject (string): The subject of the email.text (string): The plain-text content of the email.fromOverride (string, optional): Optional custom "from" address. If not provided, the user passed to the constructor is used.dryRun(enable)Method
Toggles dry-run mode.
enable (boolean): If true, emails will only be logged, not actually sent (default is true).Licensed under the Apache License 2.0.
FAQs
Simple and flexible SMTP email sender with dry-run support for testing.
We found that mailchan demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.