Skip to content

kznjunk/paperboy-gmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paperboy Gmail

How?

require('dotenv').config()

const gmailConfig = {
    clientId: process.env.clientId,
    clientSecret: process.env.clientSecret,
    refreshToken: process.env.refreshToken
}

const { sendGmail } = require('@kznjunk/paperboy-email')(gmailConfig)

const fromEmail = '[email protected]'
const toEmail = '[email protected]'
const title = 'Hello..'
const body = '..there!'

const res = await sendGmail(fromEmail, toEmail, title, body)
console.log(res)
// {
//   accepted: [ '[email protected]' ],
//   rejected: [],
//   envelopeTime: 192,
//   messageTime: 470,
//   messageSize: 352,
//   response: '250 2.0.0 OK  16164...29 - gsmtp',
//   envelope: { from: '[email protected]', to: [ '[email protected]' ] },
//   messageId: '<[email protected]>'
// }

Note

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published