@rajatsehgal/gmailer

0.0.12 • Public • Published

gmailer

A module that provides the capability to send emails through a gmail account.

Installation

npm install @rajatsehgal/gmailer --save

Usage

import gmailer from '@rajatsehgal/gmailer';

// Using email and password
gmailer.init({
  name: 'Your Name',
  email: 'you@gmail.com',
  password: 'supersecret'
});

// Or using Oauth2
gmailer.initOAuth({
  name: 'Your Name',
  email: 'you@gmail.com',
  clientId: 'Your Client ID',
  clientSecret: 'Your Client Secret',
  refreshToken: 'Your Refresh Token',
  accessToken: 'Your Access Token'
});

gmailer.send({
  to: 'someone@gmail.com',
  subject: 'Testing gmailer',
  text: 'Hello from gmailer!'
});

Readme

Keywords

Package Sidebar

Install

npm i @rajatsehgal/gmailer

Weekly Downloads

0

Version

0.0.12

License

ISC

Unpacked Size

3.79 kB

Total Files

4

Last publish

Collaborators

  • rajatsehgal