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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@adeelgulzar/nodemailwizz

v1.0.2

Published

MailWizz implementation

Readme

NPM version

node-mailwizz

I took ntlzz93's package and added some more features.

Current version is 1.0.0, feel free to make a pull request or open an issue.

To to know which API is available and params, go to api directory.

This SDK are using native Promise instead of Callback, so you can async/await as you want

How to use

First, you need to add the configuration:

const mailWizz = require("node-mailwizz");

const config = {
    publicKey: "publicKey",
    secret: "secretKey",
    baseUrl: "yourMailwizzApiUrl"
};

How to create a subscriber:

const subscribers = new mailWizz.ListSubscribers(config);

var userInfo = { //replace the values with your user info
    EMAIL: "[email protected]",
    FNAME: "Mikel",
    LNAME: "Calvo",
    CUSTOM: "custom"
};
//You can replace CUSTOM with the parameters you want

subscribers.create("LIST-UNIQUE-ID", userInfo)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to update a subscriber:

const subscribers = new mailWizz.ListSubscribers(config);

var userInfo = { //replace the values with your user's new info
    EMAIL: "[email protected]",
    FNAME: "Mikel",
    LNAME: "Calvo",
    CUSTOM: "custom"
};
//You can replace CUSTOM with the parameters you want

subscribers.update("LIST-UNIQUE-ID", "SUBSCRIBER-UNIQUE-ID", userInfo)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to delete a subscriber:

const subscribers = new mailWizz.ListSubscribers(config);

subscribers.delete("LIST-UNIQUE-ID", "SUBSCRIBER-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to unsubscribe:

const subscribers = new mailWizz.ListSubscribers(config);

subscribers.unsubscribe("LIST-UNIQUE-ID", "SUBSCRIBER-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to get your subscribers:

const subscribers = new mailWizz.ListSubscribers(config);

/Value 1 is the page number you want to get
//Value 10 is the items per package
//So if you set (1, 10) it will get the first 10 subscribers
subscribers.getSubscribers("LIST-UNIQUE-ID", 1, 10)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to get a subscriber with their id:

const subscribers = new mailWizz.ListSubscribers(config);

subscribers.getSubscriber("LIST-UNIQUE-ID", "SUBSCRIBER-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to get a subscriber with their email:

const subscribers = new mailWizz.ListSubscribers(config);

subscribers.emailSearch("LIST-UNIQUE-ID", "SUBSCRIBER-EMAIL")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to get your lists:

const lists = new mailWizz.Lists(config);

//Value 1 is the page number you want to get
//Value 10 is the items per package
//So if you set (1, 10) it will get the first 10 lists
lists.getLists(1, 10)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

If you have your list id you can directly get it:

const lists = new mailWizz.Lists(config);

lists.getList("LIST-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to create a new list:

const lists = new mailWizz.Lists(config);

var listInfo = { //Replace the values with your list info
    name: "Main List", //Required
    description: "This is a test list", //Required
    optIn: "single", //single or double
    optOut: "single", //single or double
    fromName: "Mikel Calvo", //Required
    fromEmail: "[email protected]", //Required
    replyTo: "[email protected]", //Required
    subject: "Hi!",
    //notification when new subscriber added
    notificationSubscribe: "yes", //yes or no
    notificationUnsubscribe: "yes", //yes or no
    //where to send the notification
    notificationSubscribeTo: "[email protected]",
    notificationUnsubscribeTo: "[email protected]",
    //This is optional, if not set customer company data will be used:
    companyName: "Mikel Calvo SL", //required
    companyCountry: "Spain", //required
    companyZone: "Community of Madrid", //required
    companyAddress1: "Some street address", //required
    companyAddress2: "",
    companyZoneName: "", //when country doesn't have required zone
    companyCity: "Madrid",
    companyZipCode: "28013",

};

lists.create(listInfo)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to copy a list:

const lists = new mailWizz.Lists(config);

lists.copy("LIST-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to remove a list:

const lists = new mailWizz.Lists(config);

lists.delete("LIST-UNIQUE-ID")
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });

How to update a list:

const lists = new mailWizz.Lists(config);

var newInfo = { //Replace the values with your updated list info
    name: "Main List", //Required
    description: "This is a test list", //Required
    optIn: "single", //single or double
    optOut: "single", //single or double
    fromName: "Mikel Calvo", //Required
    fromEmail: "[email protected]", //Required
    replyTo: "[email protected]", //Required
    subject: "Hi!",
    //notification when new subscriber added
    notificationSubscribe: "yes", //yes or no
    notificationUnsubscribe: "yes", //yes or no
    //where to send the notification
    notificationSubscribeTo: "[email protected]",
    notificationUnsubscribeTo: "[email protected]",
    //This is optional, if not set customer company data will be used:
    companyName: "Mikel Calvo SL", //required
    companyCountry: "Spain", //required
    companyZone: "Community of Madrid", //required
    companyAddress1: "Some street address", //required
    companyAddress2: "",
    companyZoneName: "", //when country doesn't have required zone
    companyCity: "Madrid",
    companyZipCode: "28013",

};

lists.update("LIST-UNIQUE-ID", newInfo)
    .then(function(result) {
        //TODO: do what you want
    })
    .catch(function(err) {
        //handle error here
    });