smtpclient

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedSend  = errors.New("failed to send email")
	ErrFailedInit  = errors.New("could not connect to outbound SMTP server")
	ErrFailedClose = errors.New("could not close connection to outbound SMTP server")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*Config) Validate

func (c *Config) Validate() error

type SMTPClient

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

func New

func New(config *Config, log letterbox.Logger) (*SMTPClient, error)

func (*SMTPClient) SendMail

func (sc *SMTPClient) SendMail(message *letterbox.ForwardingMessage) error

Jump to

Keyboard shortcuts

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