blackboard-send-mail
Send e-mails from Node.js – easy as Peeled bananas! 🍌✉️
![npm version](https://badge.fury.io/js/blackboard-send-mail.svg)
![NPM](https://nodei.co/npm/blackboard-send-mail.png)
Installation
$ npm install blackboard-send-mail
or
$ yarn add blackboard-send-mail
Importing
const bsm = require('blackboard-send-mail');
Overview
Connecting to Mail
First, we need to define a connection mail service. bsm.connect
bsm.connect({
host: "HOST_MAIL_DOMAIN",
auth: {
email:"EMAIL_DOMAIN",
password: "PASSWORD"
}
})
Send Email
bsm.sendMail({
from: '"Fred Foo 👻" <foo@example.com>',
to: "bar@example.com, baz@example.com",
subject: "Hello ✔",
text: "Hello world?",
html: "<b>Hello world?</b>",
}).then(info => {
console.log("Message sent: %s", info.messageId);
});