Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benoitclaveau/damless-nodemailer
Nodemailer service for dambreaker
https://github.com/benoitclaveau/damless-nodemailer
Last synced: 19 days ago
JSON representation
Nodemailer service for dambreaker
- Host: GitHub
- URL: https://github.com/benoitclaveau/damless-nodemailer
- Owner: BenoitClaveau
- License: mit
- Created: 2018-04-12T07:52:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T14:19:43.000Z (almost 4 years ago)
- Last Synced: 2024-12-03T00:39:36.551Z (26 days ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# damless-nodemailer
Use [nodemailer](https://www.npmjs.com/package/nodemailer) to send email from your [Dam Less server](https://www.npmjs.com/package/damless).## Features
* [DamLess](https://www.npmjs.com/package/damless)
* [Nodemailer](https://www.npmjs.com/package/nodemailer)
### 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 nodemailer service
```js
const DamLess = require("damless");
const damless = new DamLess();damless.inject("mailer", "damless-nodemailer");
```## API
* send(mailerOptions)
```js
const 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 damless-nodemailer
```