Skip to content

BenoitClaveau/qwebs-nodemailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ✔ <foo@blurdybloop.com>', // sender address 
    to: 'bar@blurdybloop.com, baz@blurdybloop.com', // 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

About

Send e-mail with your Qwebs server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published