qwebs-nodemailer
v0.2.18
Published
Send e-mail with nodemailer for Qwebs server.
Downloads
29
Maintainers
Readme
qwebs-nodemailer
Use nodemailer to send email from your Qwebs server.
Features
Add the nodemailer parameters in config.json
{
"nodemailer": {
"transport": {
"service": "service name",
"auth": {
"user": "user",
"pass": "password"
}
},
"dkim": {
"domainName": "your domain.com",
"keySelector": "123456",
"privateKey": "./key.pem"
},
"from": "your e-mail address"
}
Declare and inject $mailer
const Qwebs = require("qwebs");
const qwebs = new Qwebs();
qwebs.inject("$mailer", "qwebs-nodemailer");
API
- send(mailerOptions)
let mailOptions = {
from: 'Fred Foo ✔ <[email protected]>', // sender address
to: '[email protected], [email protected]', // list of receivers
subject: 'Hello ✔', // Subject line
text: 'Hello world ✔', // plaintext body
html: '<b>Hello world ✔</b>' // html body
};
return $mailer.send(mailOptions);
Installation
$ npm install qwebs-nodemailer