email

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 7 Imported by: 1

README

email plugin

This plugin send an email.

Configuration

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

action:
  type: email
  configuration:
    # mandatory, string
    smtp_username: {{.config.smtp.username}}
    # mandatory, string
    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: foo@example.org
    # optional, string
    from_name: uTask bot
    # mandatory, string collection
    to: [bar@example.org, hey@example.org]
    # 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":"foo@example.org",
  "from_name":"uTask bot",
  "to": ["bar@example.org", "hey@example.org"],
  "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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Plugin = taskplugin.New("email", "0.2", exec,
		taskplugin.WithConfig(validConfig, Config{}),
	)
)

the email plugin send email

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTPUsername      string `json:"smtp_username"`
	SMTPPassword      string `json:"smtp_password"`
	SMTPPort          string `json:"smtp_port"`
	SMTPHostname      string `json:"smtp_hostname"`
	SMTPSkipTLSVerify string `json:"smtp_skip_tls_verify,omitempty"`
	// contains filtered or unexported fields
}

Config is the configuration needed to send an email

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL