Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runnerty/executor-mail
Runnerty module: Mail executor
https://github.com/runnerty/executor-mail
ejs ejs-templates executor mail mailer runnerty
Last synced: about 1 month ago
JSON representation
Runnerty module: Mail executor
- Host: GitHub
- URL: https://github.com/runnerty/executor-mail
- Owner: runnerty
- License: mit
- Created: 2017-04-07T14:50:12.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T13:51:38.000Z (8 months ago)
- Last Synced: 2024-11-15T15:46:06.027Z (about 2 months ago)
- Topics: ejs, ejs-templates, executor, mail, mailer, runnerty
- Language: HTML
- Size: 151 KB
- Stars: 0
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
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 executor for [Runnerty]:
Email notification module with [ejs] template support.
### Installation:
```bash
npm i @runnerty/executor-mail
```You can also add modules to your project with [runnerty]
```bash
npx runnerty add @runnerty/executor-mail
```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-mail
```### Configuration samples:
Add in [config.json]:
```json
{
"id": "mail_default",
"type": "@runnerty-executor-mail",
"disable": false,
"from": "Runnerty Notificator ",
"transport": "smtp://my%mailsender.com:[email protected]/?pool=true",
"bcc": ["[email protected]"],
"templateDir": "/etc/runnerty/templates",
"template": "alerts",
"ejsRender": true
}
``````json
{
"id": "mail_aws_ses_iam_smtp",
"type": "@runnerty-executor-mail",
"disable": false,
"from": "Runnerty ",
"transport": {
"host": "email-smtp.eu-west-1.amazonaws.com",
"port": 465,
"secure": true,
"auth": {
"user": "aws_ses_user",
"pass": "aws_ses_pass"
}
},
"templateDir": "/etc/runnerty/templates",
"template": "alerts",
"ejsRender": true
}
```To use AWS SES [transport]:
```json
{
"id": "mail_aws_ses_role",
"type": "@runnerty-executor-mail",
"from": "Runnerty ",
"transport": {
"service": "SES",
"region": "us-east-1",
"ses": {
// optional extra arguments for SendRawEmail
"Tags": [
{
"Name": "tag_name",
"Value": "tag_value"
}
]
}
},
"templateDir": "/etc/runnerty/templates",
"template": "alerts",
"ejsRender": true
}
```### Plan sample:
Add in [plan.json]:
```json
{
"id": "mail_default",
"to": ["[email protected]"],
"title": "Runnerty Mailer",
"message": "My message from Runnerty!",
"attachments": [
{
"filename": "sample.png",
"path": "/etc/runnerty/templates/alerts/images/sample.png",
"cid": "[email protected]"
}
]
}
```### EJS Template sample:
#### Plan:
```json
{
"id": "mail_default",
"to": ["[email protected]"],
"title": "Runnerty Mailer",
"message": "My message from Runnerty!",
"args": { "value_one": "Hello", "value_two": "world!", "value_three": ":YYYY" }
}
```#### HTML Template:
```html
<%= value_one %> <%= value_two %>
<%= value_three %>
```
## Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
guidelines for [contributing][contributing].[contributing]: https://github.com/runnerty/runnerty/blob/master/CONTRIBUTING.md
[runnerty]: https://www.runnerty.io
[downloads-image]: https://img.shields.io/npm/dm/@runnerty/executor-mail.svg
[npm-url]: https://www.npmjs.com/package/@runnerty/executor-mail
[npm-image]: https://img.shields.io/npm/v/@runnerty/executor-mail.svg
[david-badge]: https://david-dm.org/runnerty/executor-mail.svg
[david-badge-url]: https://david-dm.org/runnerty/executor-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