package
1.33.0-rc3
Repository: https://github.com/ovh/utask.git
Documentation: pkg.go.dev

# README

email plugin

This plugin send an email.

Configuration

FieldsDescription
smtp_usernameusername of SMTP server
smtp_passwordpassword of SMTP server
smtp_portport of SMTP server
smtp_hostnamehostname of SMTP server
smtp_skip_tls_verifSkip or not TLS insecure verify
from_addressfrom which email you want to send the message
from_namefrom which name you want to send the message
toreceiver(s) of your email
subjectsubject of your email
bodycontent of your email

Example

An action of type email requires the following kind of configuration:

action:
  type: email
  configuration:
    # optional, string, leave empty for no auth
    smtp_username: {{.config.smtp.username}}
    # optional, string, leave empty for no auth
    smtp_password: {{.config.smtp.password}}
    # mandatory, string as uint
    smtp_port: {{.config.smtp.port}}
    # mandatory, string
    smtp_hostname: {{.config.smtp.hostname}}
    # optional, string as boolean
    smtp_skip_tls_verify: "true"
    # mandatory, string
    from_address: [email protected]
    # optional, string
    from_name: uTask bot
    # mandatory, string collection
    to: [[email protected], [email protected]]
    # mandatory, string
    subject: Hello from µTask
    # mandatory, string
    body: |
      I love baguette

Note

The plugin returns an object to reuse the parameters in a future component:

{
  "from_address":"[email protected]",
  "from_name":"uTask bot",
  "to": ["[email protected]", "[email protected]"],
  "subject":"Hello from µTask",
  "body":"I love baguette"
}

Sensitive data should be retrieved from configstore and accessed through {{.config.[itemKey]}} rather than hardcoded in your template.

Resources

The email plugin declares automatically resources for its steps:

  • socket to rate-limit concurrent execution on the number of open outgoing sockets
  • url:smtp_hostname (where smtp_hostname is the outgoing SMTP server of the plugin configuration) to rate-limit concurrent execution on a specific outgoing SMTP server

# Variables

the email plugin send email.

# Structs

Config is the configuration needed to send an email.