Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benoitclaveau/qwebs-nodemailer
Send e-mail with your Qwebs server
https://github.com/benoitclaveau/qwebs-nodemailer
Last synced: 19 days ago
JSON representation
Send e-mail with your Qwebs server
- Host: GitHub
- URL: https://github.com/benoitclaveau/qwebs-nodemailer
- Owner: BenoitClaveau
- License: mit
- Created: 2015-10-16T12:23:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-24T17:29:26.000Z (almost 7 years ago)
- Last Synced: 2024-04-20T13:53:25.074Z (8 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qwebs-nodemailer
Use [nodemailer](https://www.npmjs.com/package/nodemailer) to send email from your [Qwebs server](https://www.npmjs.com/package/qwebs).## Features
* [Qwebs](https://www.npmjs.com/package/qwebs)
* [Nodemailer](https://www.npmjs.com/package/nodemailer)
* [Promise](https://www.npmjs.com/package/q)
### Add the nodemailer parameters in config.json```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
```js
const Qwebs = require("qwebs");
const qwebs = new Qwebs();qwebs.inject("$mailer", "qwebs-nodemailer");
```## API
* send(mailerOptions)
```js
let mailOptions = {
from: 'Fred Foo ✔ ', // sender address
to: '[email protected], [email protected]', // list of receivers
subject: 'Hello ✔', // Subject line
text: 'Hello world ✔', // plaintext body
html: 'Hello world ✔' // html body
};return $mailer.send(mailOptions);
```## Installation
```bash
$ npm install qwebs-nodemailer
```