smtp

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSMTP

func NewSMTP(logger logger.Logger) bindings.OutputBinding

NewSMTP returns a new smtp binding instance.

Types

type Mailer

type Mailer struct {
	// contains filtered or unexported fields
}

Mailer allows sending of emails using the Simple Mail Transfer Protocol.

func (*Mailer) Init

func (s *Mailer) Init(metadata bindings.Metadata) error

Init smtp component (parse metadata).

func (*Mailer) Invoke

Invoke sends an email message.

func (*Mailer) Operations

func (s *Mailer) Operations() []bindings.OperationKind

Operations returns the allowed binding operations.

type Metadata

type Metadata struct {
	Host          string `json:"host"`
	Port          int    `json:"port"`
	User          string `json:"user"`
	SkipTLSVerify bool   `json:"skipTLSVerify"`
	Password      string `json:"password"`
	EmailFrom     string `json:"emailFrom"`
	EmailTo       string `json:"emailTo"`
	EmailCC       string `json:"emailCC"`
	EmailBCC      string `json:"emailBCC"`
	Subject       string `json:"subject"`
	Priority      int    `json:"priority"`
}

Metadata holds standard email properties.

Jump to

Keyboard shortcuts

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