#Email

This plugin allows you to send an email using Nodemailer.

version: "1"
packageManagers:
  - packageManager:
      name: npm
    actions:
      - name: email
        config:
          transportOptions:
            host: smtp.company.com
            port: 1025
            auth:
              user: "${env.EMAIL_USERNAME}"
              pass: "${env.EMAIL_PASSWORD}"
          messageConfig:
            from: "pmbot@company.com"
            to: "admin@company.com"
            subject: "Automated update of {{slug}} {{statusEmoji}}"
          additionalText: "Please contact John if there is any issue."

#transportOptions

A YAML object with Nodemailer transport options. For example:

version: '1'
packageManagers:
  - packageManager:
      name: email
      config:
        transportOptions:
          port: 1025
          host: mailhog # inside a Docker network

#messageConfig

#from

Email address of the sender. See Nodemailer's message config for advanced usage.

#to

Comma-separated list of recipients. See Nodemailer's message config for advanced usage.

#subject

The email subject.

This handlebars template is passed the following context:

{
    "slug": "myPm",
    "status": "myStatus",
    "statusEmoji": "🚀"
}
Property Description
slug Key that identifies the update in your configuration. For example, "npm", or, "npm-0" when there are multiple packageManagerUpdates configured with npm as the packageManager.name.
status Status of the package manager update
statusEmoji Emoji corresponding to the package manager update status

#Additional properties

You may add any additional Nodemailer message properties, except html and text which are overridden by the plugin.

For example, if you want to add cc, you can do:

version: '1'
packageManagers:
  - packageManager:
      name: npm
    actions:
      - name: email
        config:
          ...
          messageConfig:
            cc: 'test@test.com'

#additionalText

Additional text to embed in the email body.