smtpclient

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: AGPL-3.0 Imports: 7 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 NopClient added in v0.1.12

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

func NewNopClient added in v0.1.12

func NewNopClient(log logger.Logger) *NopClient

func (*NopClient) SendMail added in v0.1.12

func (nop *NopClient) SendMail(message *letterbox.ForwardingMessage) error

type SMTPClient

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

func New

func New(config *Config, log logger.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