nzm-smtp-client

1.0.0 • Public • Published

Newsman SMTP API Node Client

Newsman is a Smart Email Service Provider. We send newsletters on behalf of our customers.
This is a very compact NodeJS wrapper and it uses Axios HTTP calls to our Newsman REST API.

See https://kb.newsmansmtp.com/api/ for details.
You must set up a Newsman SMTP Account ID and API key.

Usage sample

const Nzmsmtp = require('nzm-smtp-client')

const client = new Nzmsmtp.method('template', 'get')

const getTemplate = async () => {

    try {
        const template = await client.callParams(
            {
                account_id: 'youraccount',
                key: 'yourapikey',
                template_id: 'yourtemplateid'
            }
        )
        console.log(template.data);
    } catch (error) {
        console.error(error)
    }

}

getTemplate() 

Package Sidebar

Install

npm i nzm-smtp-client

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.75 kB

Total Files

3

Last publish

Collaborators

  • newsman