@mont3ch/mailing
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

mailing

Mailing library layer

HOW TO USE

In this earlier version I'm exposing a class for each integration we have. In order to use the library please:

  1. Download it using npm install @mont3ch/mailing --save
import { Sendgrid } from '@mont3ch/mailing';

const configuration = {
  apiKey: 'my-sendgrid-api-key',
  apiKeyId: 'my-sendgrid-api-key-id'
}

const mailData = {
  to: ['person@xyz.com'],
  from: 'sendgridConfiguredMail@xyz.com',
  subject: 'my subject',
  text: 'my email text'
}
const mail = new Sendgrid(configuration);
try { 
  await mail.sendMail(mailData);

} catch(error){
  console.log('an error ocurred', error);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @mont3ch/mailing

Weekly Downloads

1

Version

0.2.2

License

ISC

Unpacked Size

23.7 kB

Total Files

33

Last publish

Collaborators

  • hugo.montero