3.1.4 • Published 7 months ago

@runnerty/executor-mail v3.1.4

Weekly downloads
10
License
MIT
Repository
github
Last release
7 months ago

NPM version Downloads Dependency Status

Mail executor for Runnerty:

Email notification module with ejs template support.

Installation:

npm i @runnerty/executor-mail

You can also add modules to your project with runnerty

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:

runnerty add @runnerty/executor-mail

Configuration samples:

Add in config.json:

{
  "id": "mail_default",
  "type": "@runnerty-executor-mail",
  "disable": false,
  "from": "Runnerty Notificator <sample@runnerty.io>",
  "transport": "smtp://my%mailsender.com:pass@smtp.host.com/?pool=true",
  "bcc": ["mycc@mail.com"],
  "templateDir": "/etc/runnerty/templates",
  "template": "alerts",
  "ejsRender": true
}
{
  "id": "mail_aws_ses_iam_smtp",
  "type": "@runnerty-executor-mail",
  "disable": false,
  "from": "Runnerty <hello@runnerty.io>",
  "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:

{
  "id": "mail_aws_ses_role",
  "type": "@runnerty-executor-mail",
  "from": "Runnerty <hello@runnerty.io>",
  "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:

{
  "id": "mail_default",
  "to": ["my@mail.com"],
  "title": "Runnerty Mailer",
  "message": "My message from Runnerty!",
  "attachments": [
    {
      "filename": "sample.png",
      "path": "/etc/runnerty/templates/alerts/images/sample.png",
      "cid": "img_name@sample.png"
    }
  ]
}

EJS Template sample:

Plan:

{
  "id": "mail_default",
  "to": ["my@mail.com"],
  "title": "Runnerty Mailer",
  "message": "My message from Runnerty!",
  "args": { "value_one": "Hello", "value_two": "world!", "value_three": ":YYYY" }
}

HTML Template:

<html>
  <head>
    <title><%= value_one %> <%= value_two %></title>
  </head>
  <body>
    <%= value_three %>
  </body>
</html>

Want to help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing.

3.1.4

7 months ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.1.0-rc

2 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.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

5 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago