msend

package
v0.0.0-...-0202b1c Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSMTPInvalidConfig    = errors.New("invalid smtp configuration")
	ErrSMTPConnectionFailed = errors.New("connection to smtp server failed")
	ErrSendMessageFailed    = errors.New("could not send message")
)
View Source
var (
	ErrSendFail = errors.New("could not send message")
)

Functions

This section is empty.

Types

type MSender

type MSender interface {
	Send(msg *Message) error
}

type Memory

type Memory struct {
	Messages []*Message
	Err      error
}

func NewMemory

func NewMemory() *Memory

func (*Memory) Send

func (mem *Memory) Send(msg *Message) error

type Message

type Message struct {
	Subject string
	Body    string
}

type SSLSMTP

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

func NewSSLSMTP

func NewSSLSMTP(config *SSLSMTPConfig) *SSLSMTP

func (*SSLSMTP) Close

func (s *SSLSMTP) Close() error

func (*SSLSMTP) Connect

func (s *SSLSMTP) Connect() error

func (*SSLSMTP) Send

func (s *SSLSMTP) Send(msg *Message) error

type SSLSMTPConfig

type SSLSMTPConfig struct {
	URL      string
	Username string
	Password string
	From     string
	To       string
}

func (*SSLSMTPConfig) Valid

func (ssc *SSLSMTPConfig) Valid() bool

Jump to

Keyboard shortcuts

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