3.2.1 • Published 2 years ago

@runnerty/notifier-mail v3.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

NPM version Downloads Dependency Status

Mail notifier for Runnerty:

Email notification module with ejs template support.

Installation:

Through NPM

npm i @runnerty/notifier-mail

You can also add modules to your project with runnerty

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:

runnerty add @runnerty/executor-mysql

Configuration sample:

Add in config.json:

{
  "notifiers": [
    {
      "id": "mail_default",
      "type": "@runnerty-notifier-mail",
      "disable": false,
      "from": "Runnerty <my@mail.com>",
      "transport": "smtps://my%40mail.com:mypass@smtp.mail.com/?pool=true",
      "templateDir": "/etc/runnerty/templates",
      "template": "alerts",
      "to": ["to@mail.com"],
      "ejsRender": true
    }
  ]
}
{
  "notifiers": [
    {
      "id": "mail_default",
      "type": "@runnerty-notifier-mail",
      "disable": false,
      "from": "Runnerty <my@mail.com>",
      "to": ["NAME <to@mail.com>"],
      "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": "cid_img_sample@runnerty.png"
        }
      ],
      "ejsRender": true,
      "maxConcurrents": 2,
      "minInterval": 25
    }
  ]
}

To use AWS SES transport:

{
  "notifiers": [
    {
      "id": "mail_aws_ses_role",
      "type": "@runnerty-notifier-mail",
      "from": "Runnerty <hello@runnerty.io>",
      "to": ["Support <support@mail.com>"],
      "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:

{
  "notifications": {
    "on_fail": [
      {
        "id": "mail_error",
        "subject": "ERROR - PROCESS @GV(PROCESS_ID) CHAIN @GV(CHAIN_ID)",
        "message": "CMD:<br> @GV(PROCESS_EXEC_COMMAND_EXECUTED)<br>ERROR:<br>@GV(PROCESS_EXEC_ERR_OUTPUT)"
      }
    ]
  }
}
3.2.1

2 years ago

3.1.2

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.1.0-rc

2 years ago

3.1.0-rc1

2 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

4 years ago

1.1.0

5 years ago

1.0.0

6 years ago