mailer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSModeStartTLS = "starttls"
	TLSModeTLS      = "tls"
	TLSModePlain    = "plain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Send(context.Context, Message) error
}

Mailer sends plain-text transactional email messages.

func NewNoop

func NewNoop() Mailer

func NewSMTP

func NewSMTP(cfg SMTPConfig) (Mailer, error)

type Message

type Message struct {
	To       []string
	Subject  string
	TextBody string
}

type SMTPConfig

type SMTPConfig struct {
	Host        string
	Port        int
	Username    string
	Password    string
	FromAddress string
	FromName    string
	TLSMode     string
}

Jump to

Keyboard shortcuts

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