https://github.com/runnerty/notifier-mail
Runnerty module: Mail notifier.
https://github.com/runnerty/notifier-mail
mail-notifier runnerty
Last synced: 3 months ago
JSON representation
Runnerty module: Mail notifier.
- Host: GitHub
- URL: https://github.com/runnerty/notifier-mail
- Owner: runnerty
- License: mit
- Created: 2018-01-26T07:52:51.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-09-18T14:58:36.000Z (over 1 year ago)
- Last Synced: 2025-02-28T23:38:03.063Z (3 months ago)
- Topics: mail-notifier, runnerty
- Language: HTML
- Size: 297 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Smart Processes Management
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Dependency Status][david-badge]][david-badge-url]
![]()
# Mail notifier for [Runnerty]:
Email notification module with [ejs] template support.
### Installation:
Through NPM
```bash
npm i @runnerty/notifier-mail
```You can also add modules to your project with [runnerty]
```bash
npx runnerty add @runnerty/executor-mysql
```This command installs the module in your project, adds example configuration in your [config.json] and creates an example plan of use.
If you have installed [runnerty] globally you can include the module with this command:
```bash
runnerty add @runnerty/executor-mysql
```### Configuration sample:
Add in [config.json]:
```json
{
"notifiers": [
{
"id": "mail_default",
"type": "@runnerty-notifier-mail",
"disable": false,
"from": "Runnerty ",
"transport": "smtps://my%40mail.com:[email protected]/?pool=true",
"templateDir": "/etc/runnerty/templates",
"template": "alerts",
"to": ["[email protected]"],
"ejsRender": true
}
]
}
``````json
{
"notifiers": [
{
"id": "mail_default",
"type": "@runnerty-notifier-mail",
"disable": false,
"from": "Runnerty ",
"to": ["NAME "],
"transport": {
"host": "smtp.mailhost.com",
"port": 465,
"secure": true,
"auth": {
"user": "USER_SAMPLE",
"pass": "PASS_SAMPLE"
}
},
"templateDir": "templates",
"template": "template_one",
"attachments": [
{
"filename": "runnerty.png",
"path": "templates/imgs/runnerty.png",
"cid": "[email protected]"
}
],
"ejsRender": true,
"maxConcurrents": 2,
"minInterval": 25
}
]
}
```To use AWS SES [transport]:
```json
{
"notifiers": [
{
"id": "mail_aws_ses_role",
"type": "@runnerty-notifier-mail",
"from": "Runnerty ",
"to": ["Support "],
"transport": {
"service": "SES",
"region": "us-east-1",
"ses": {
// optional extra arguments for SendRawEmail
"Tags": [
{
"Name": "tag_name",
"Value": "tag_value"
}
]
}
},
"templateDir": "templates",
"template": "mail-notification",
"ejsRender": true
}
]
```### Plan sample:
Add in [plan.json]:
```json
{
"notifications": {
"on_fail": [
{
"id": "mail_error",
"subject": "ERROR - PROCESS @GV(PROCESS_ID) CHAIN @GV(CHAIN_ID)",
"message": "CMD:
@GV(PROCESS_EXEC_COMMAND_EXECUTED)
ERROR:
@GV(PROCESS_EXEC_ERR_OUTPUT)"
}
]
}
}
```[runnerty]: https://www.runnerty.io
[downloads-image]: https://img.shields.io/npm/dm/@runnerty/notifier-mail.svg
[npm-url]: https://www.npmjs.com/package/@runnerty/notifier-mail
[npm-image]: https://img.shields.io/npm/v/@runnerty/notifier-mail.svg
[david-badge]: https://david-dm.org/runnerty/notifier-mail.svg
[david-badge-url]: https://david-dm.org/runnerty/notifier-mail
[config.json]: http://docs.runnerty.io/config/
[plan.json]: http://docs.runnerty.io/plan/
[transport]: https://nodemailer.com/transports/ses/
[ejs]: https://ejs.co