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

emailit

v1.8.0

Published

This will allow you to send emails using nodemailer, using the SMTP protocol and you would have to jsut pass relevant information to do so

Downloads

14

Readme

NPM PACKAGE emailit

This will allow you to send emails using smtpTransport via nodemailer

#INSTALL

Install emailIt package to your machine using this command,

  npm i emailit

Parameters

emailit(template, fileFormat, mailDetails, templateData, callback);

  • template : Name of the template you wish to render in email;

  • fileFormat : Format of the file you are sending. eg: 'hbs', 'pug' NOTE: If the template format is html, keep the fileFormat param to hbs and also, update your actual template format. Because hbs format renders the required template and returns an html file

  • mailDetails: -recepient: (email address of the receiver), -sender: (email address of the sender), -subject: (Subject of the email),

  • templateData: (relevant template data that your templates need dynamically),

  • template : Name of the template you wish to render in email;

  • callback: A callback function;

#ENVIRONMENT VARIABLES REQUIRED

  • MAIL_USERNAME=''
  • MAIL_PASSWORD=''
  • MAIL_HOST='' gmail || mailgun || yahoo etc
  • MAIL_SERVICE='' smtp.gmail.com || smtp.yahoo.com || smtp.sendgrid.net || smtp.mailgun.com (depending upon your host)

#USE Import/require 'emailit' from newPackage Define parameter's value before calling emailIt or pass it directly in the function call

Eg:

const emailit = require('./emailit');
emailit(template, fileFormat, mailDetails, templateData, (err,res)=> {});

#EXAMPLE Refer example.js for implementation

const emailit = require('./emailit'); 

const example = function() {
  const mailDetails = {
    'recepient': '[email protected]',
    'sender': '[email protected]',
    'subject': 'Its Working'
  }
  
  const templateData = {
    name: "XYZ"
  }
  emailit(template = 'verify-email', fileFormat = 'hbs', mailDetails, templateData, (err,res)=> {
    if(err) {
      console.log('Sending email Failed');
    } else {
      console.log('Email is successfully sent.');
    }

  })
};

example();