smtp

package
v0.0.0-...-a1328c3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 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")
)

Functions

This section is empty.

Types

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(from, to mail.Address, subject, body string) error

type SSLSMTPConfig

type SSLSMTPConfig struct {
	URL      string
	Username string
	Password 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