quang-email-service
TypeScript icon, indicating that this package has built-in type declarations

2.2.7 • Public • Published

Introduction

Send email easily with sendgrid, mandrill and mailgun api

Installation

npm install --save quang-email-service

Usage

In Javascript:

const MailService = require('quang-email-service').default

In Typescript:

import MailService from 'quang-email-service'
const email = new MailService({
    sendgrid: {
        apiKey: 'sendgrid-apiKey'
    },
    mandrill: {
        apiKey: 'mandrill-apikey'
    },
    mailgun: {
        apiKey: 'mailgun-apikey',
        domain: ''
    }
});

...

email.send({
    from: from_email,
    to: to_email,
    subject: 'email-subject',
    html: 'email content in HTML'
})

Readme

Keywords

none

Package Sidebar

Install

npm i quang-email-service

Weekly Downloads

2

Version

2.2.7

License

ISC

Unpacked Size

7.77 kB

Total Files

13

Last publish

Collaborators

  • quangvo