JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q86426F
  • License MIT

Runnerty module: Mail notifier

Package Exports

  • @runnerty/notifier-mail

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@runnerty/notifier-mail) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

A new way for processes managing

NPM version Downloads Dependency Status code style: prettier

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-cli

npx runnerty-cli add @runnerty/notifier-mail

This command installs the module in your project, adds example configuration in your config.json.

If you have installed runnerty-cli globally you can include the module with this command:

rty add @runnerty/notifier-mail

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
    }
  ]
}

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)"
      }
    ]
  }
}