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

digi-sendzi

v1.0.0

Published

A simple SMTP email sending library.

Downloads

7

Readme

digi-sendzi ✉️

digi-sendzi is a simple yet powerful SMTP email-sending library built in JavaScript. It provides an easy-to-use interface for sending emails, supporting plain text, HTML content, and attachments.

Features 🌟

  • Send emails using SMTP protocol: Reliable and secure email delivery.
  • Support for multipart emails: Easily send both text and HTML formats.
  • Attach files to emails: Include attachments for richer communication.
  • Basic authentication support: Use your username and password for authentication.
  • Simple error handling: Manage errors with ease.

Installation 🛠️

To install digi-sendzi, you can use npm:

npm install digi-sendzi

Usage 📧

Basic Example Here’s a simple example of how to use digi-sendzi to send an email:

import { createTransport } from 'digi-sendzi';

const transporter = createTransport({
    host: 'smtp.example.com',
    port: 587,
    auth: {
        user: '[email protected]',
        pass: 'your-email-password'
    }
});

const mailOptions = {
    from: '[email protected]',
    to: '[email protected]',
    subject: 'Hello from digi-sendzi! 🌍',
    text: 'This is a plain text message.',
    html: '<strong>This is a bold HTML message.</strong>',
    attachments: [
        {
            filename: 'example.txt',
            content: 'Hello, this is the content of the file!',
            contentType: 'text/plain'
        }
    ]
};

transporter.sendMail(mailOptions)
    .then(() => {
        console.log('Email sent successfully! 🎉');
    })
    .catch((error) => {
        console.error('Error sending email:', error.message);
    });

API Reference 📚

createTransport(options)

Creates a new Transporter instance.

options: An object containing the following properties:

  • host (string): The SMTP server host.
  • port (number, optional): The port to connect to (default is 25).
  • auth (object, optional): An object containing user and pass for authentication.

Transporter.sendMail(mailOptions)

Sends an email with the specified options.

mailOptions: An object containing the following properties:

  • from (string): Sender's email address (required).
  • to (string): Recipient's email address (required).
  • subject (string): Email subject (required).
  • text (string): Plain text body of the email (required).
  • html (string, optional): HTML body of the email.
  • attachments (array, optional): An array of attachment objects with filename, content, and contentType.

Error Handling ⚠️

digi-sendzi provides basic error handling. If any required fields are missing or an error occurs during the SMTP connection or email sending, an error will be thrown. You can catch these errors using a .catch() block when sending an email.

Development 💻

To run tests, ensure you have Jest installed as a dev dependency, and run:

npm test

License 📝

This project is licensed under the ISC License.

Author ✍️

DigiMantra

Links