@rajatsehgal/gmailer
v0.0.12
Published
A module that provides the capability to send emails through a gmail account.
Downloads
4
Readme
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: '[email protected]',
password: 'supersecret'
});
// Or using Oauth2
gmailer.initOAuth({
name: 'Your Name',
email: '[email protected]',
clientId: 'Your Client ID',
clientSecret: 'Your Client Secret',
refreshToken: 'Your Refresh Token',
accessToken: 'Your Access Token'
});
gmailer.send({
to: '[email protected]',
subject: 'Testing gmailer',
text: 'Hello from gmailer!'
});