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 🙏

© 2024 – Pkg Stats / Ryan Hefner

quick-mail

v1.0.24

Published

quick-mail is a powerful and flexible email automation library designed for JavaScript applications. It enables developers to easily send bulk emails with variant subjects and content using different or customized HTML templates. This library simplifies t

Downloads

10

Readme

quick-mail

quick-mail is a powerful and flexible email automation library designed for Javascript applications. It enables developers to easily send bulk emails with variant subjects and content using different or customized HTML templates. This library simplifies the process of managing and automating email campaigns, making it ideal for marketing, notifications, and other automated email tasks.

Installation

To install the package, use npm or yarn:

npm install quick-mail

or

yarn add quick-mail

Important

For Gmail users, it is recommended to use a Google App Password instead of your regular email password for added security. You can generate an App Password by following these steps:

  1. Activate two-step verification on your Google account.
  2. Generate an App Password. To use the quick-mail package, import the sendEmail function and provide the necessary email details. Google App Passwords

Usage

To use the quick-mail package, import the sendEmail function and provide the necessary email details:

  • you can use either text or HTML for the email content

const quickMail = require("quick-mail");

quickMail.sendEmail({
    from: "[email protected]",
    to: "[email protected]",
    subject: "This Email is about testing NPM",
    text: "Your Content",
    password: "your-app-password" or "your-email-password",
    html: `your HTML template`
    });

import { sendEmail } from "quick-mail";

const Mail = async () => {
  try {
    const response = await sendEmail({
    from: "[email protected]",
    to: "[email protected]",
    subject: "This Email is about testing NPM",
    text: "Your Content",
    password: "your-app-password" or "your-email-password",
    html: `your HTML template`
    });
    console.log("Email sent successfully:", response);
  } catch (error) {
    console.error("Error sending email:", error.message);
  }
};

Mail();

HTML Usage


import { sendEmail } from "quick-mail";


const Mail = async () => {
  try {
    const response = await sendEmail({
    from: "[email protected]",
    to: "[email protected]",
    subject: "This Email is about testing NPM",
    text: "Your Content",
    password: "your-app-password" or "your-email-password",
    html: `
    <!DOCTYPE html>
    <html>
    <head>
      <style>
        body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
        .container { width: 100%; max-width: 600px; margin: auto; padding: 20px; background: #f4f4f4; }
        .header { background: #333; color: #fff; padding: 10px; text-align: center; }
        .content { background: #fff; padding: 20px; border-radius: 5px; }
        .footer { text-align: center; padding: 10px; background: #333; color: #fff; font-size: 12px; }
        @media (max-width: 600px) { .container { padding: 10px; } }
      </style>
    </head>
    <body>
      <div class="container">
        <div class="header">
          <h1>Welcome to Our Service</h1>
        </div>
        <div class="content">
          <h2>Hello, User!</h2>
          <p>This is a test email.</p>
        </div>
        <div class="footer">
          <p>&copy; 2024 Your Company. All rights reserved.</p>
        </div>
      </div>
    </body>
    </html>
  `
    });
    console.log("Email sent successfully:", response);
  } catch (error) {
    console.error("Error sending email:", error.message);
  }
};

Mail();

Log


const quickMail = require("quick-mail");

    quickMail.sendEmail({
  from: "[email protected]",
  to: "[email protected]",
  subject: "This Email is about testing NPM",
  text: "Your Content",
  password: "your-app-password" or "your-email-password",

}).then(response => {
  console.log('Email sent:', response);
}).catch(error => {
  console.error('Error sending email:', error);
});

// Import the sendEmail function from your package
import { sendEmail } from 'quick-mail';

const sendTestEmail = async () => {
  try {
    const result = await sendEmail({
  from: "[email protected]",
  to: "[email protected]",
  subject: "This Email is about testing NPM",
  text: "Your Content",
  password: "your-app-password" or "your-email-password",

});

    console.log('Email sent successfully:', result);
  } catch (error) {
    console.error('Failed to send email:', error);
  }
};

// Call the function to send the email
sendTestEmail();