npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

multimails-nodemailer

v0.7.0

Published

An external module to use to send many emails using nodemailer

Readme

This is a simple module to send many e-mails using nodemailer and retrieve the action when there is a connection error using winston module.

Send many mails with nodemailer

The purpose of this module is manage a JSON object to send many mails using nodemailer. The connection informations are retrieved by dotenv module from .env file. Another thing is that if the parameters from and sender don't exist, the module take the user credentials. I decide to manage the logging system using Winston module, it seems very flexible! It permits, in a simple manner, to manage the response using different methods. The critical errors messages and the sent informations are configurable, for the connection errors I decide to use a file to stored the informations and then retrieve to attempt again the operation.

Dependencies

What you need to run this app:

Instructions

Setup

  • npm install multimails-nodemailer

functions' documentation:

send_mail

this function will expect two arrays that will contains:

  1. a list of objects formatted following this guide: https://nodemailer.com/message/ example:

[{from:"[email protected]", to:"[email protected]",subject:"E-mail subject", text:"text message"}, {to:"[email protected]", subject:"Subject", html:"Hello all"}]

  1. an array with two objects formatted following this page: https://github.com/winstonjs/winston

example:

const errlog = winston.createLogger({ format: winston.format.json(), level:'error', transports: [ new winston.transports.File({ filename: 'mail_errors.json', level: 'error' }) ] }); const infolog = winston.createLogger({ format: winston.format.json(), level:'info', transports: [ new winston.transports.File({ filename: 'mail_logs.json', level:'info' }) ] }); var loggers=[errlog,infolog];

Note: the order isn't casual, the app will try to set error in the first object and info into the second. Note 2: the app will create automaticalli also one file to manage the connection's errors named mail_warn.json.

send_old_mail

this function read the file mail_warn.json (created with the function send_mail) and rename it to mail_warn.log; then read the file and recreate an array with the e-mail's informations and send it to send_mail passing also an object to set the loggers described previously. The function want an array of two objects like the second object passend on send_mail.

The version 1.0.0 will contains two loggers setted in another file or something like that to manage a call withoud these informations.