email

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPConfig

type SMTPConfig struct {
	Host     string
	Port     int
	Username string
	Password string
	Hello    string
	FromName string
	From     string
	TLSMode  TLSMode
	Timeout  time.Duration
}

SMTPConfig configures the built-in SMTP provider.

type SMTPProvider

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

SMTPProvider sends emails through an SMTP server.

func NewSMTPProvider

func NewSMTPProvider(cfg SMTPConfig) (*SMTPProvider, error)

NewSMTPProvider builds an SMTP provider from config.

func (*SMTPProvider) Send

func (p *SMTPProvider) Send(ctx context.Context, to, subject, textBody, htmlBody string) error

Send sends one email.

type TLSMode

type TLSMode string

TLSMode controls SMTP transport security.

const (
	TLSModeStartTLS TLSMode = "starttls"
	TLSModePlain    TLSMode = "plain"
)

Jump to

Keyboard shortcuts

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