1.1.1 • Published 4 years ago

gmail-api v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Gmailer

Interact with the Gmail API

API

sendMail(options)

options: <Object>

All options are required

OptionTypeDescription
fromStringSenders email address
toString, List or ArrayWho to send the email to.
subjectStringSubject of the email
bodyStringBody of the email. Accepts html

Example:

const { sendMail } = require('gmail-api');

sendMail({
	from: '"John Doe" <john@doe.com>',

	// <Array> Sends an individual email to each person.

	// <List> Sends one email to all recipients
	// (e. g. 'my@email.com, your@email.com')

	// <String> Send one email to the recipient
	// (e. g. 'my@email.com')
	to: ['myfriend@yahoo.com', 'yourfriend@hotmail.com'],
	subject: 'Node.js Email',

	// `file(url)` Sends the contents of the file url
	body: file('../email.html'),
});

file(url)

url: <String> or <Url>

Sends the contents of the url.

// Accepts absolute and relative paths
file('https://example.com/myfile.html');
file('../myfile.js');

Full docs avaliable at Docs

1.1.1

4 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago

0.0.0

6 years ago