1.0.7 • Published 3 years ago

nm-wrapper v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nm-wrapper

nm-wrapper is a TypeScript library that wraps around the famous nodemailer library. Written primarily for personal use. Compatible with ES5. Singleton pattern.

Installation

Use the package manager npm to install nm-wrapper.

npm i nm-wrapper

Usage

import { createMailService } from 'nm-wrapper';

// service configurations
const configuration = {
  emailName: 'name-to-be-displayed',
  transporter: {
    service: 'gmail', //yahoo
    secure: false,
    debug: false,
    logger: true,
    port: 3000,
    auth: {
      user: 'your-email@gmail.com',
      pass: 'password',
    },
  },
};

// create an instance of nodemailer's MailService class,
// always uses that one instance
const mail = createMailService(configuration);

// use mailer
mail.sendMail('send-to@gmail.com', 'subject', '<h1>body</h1>');

Contributing

Suggestions and improvements are welcome

Support

Contact me at: sediballiu03@gmail.com

License

MIT

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago