mailer

package
v0.0.0-...-36ecd39 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Subject  string
	TextBody string
	HTMLBody string
}

type LogMailer

type LogMailer struct {
	Writer io.Writer
}

func (LogMailer) Send

func (m LogMailer) Send(_ context.Context, msg Message) error

type Mailer

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

type Message

type Message struct {
	To       string
	Subject  string
	TextBody string
	HTMLBody string
	Headers  map[string]string
}

type NopMailer

type NopMailer struct{}

func (NopMailer) Send

type ResendConfig

type ResendConfig struct {
	APIKey      string
	From        string
	BaseURL     string
	HTTPClient  *http.Client
	SendTimeout time.Duration
}

type ResendMailer

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

func NewResendMailer

func NewResendMailer(cfg ResendConfig) (*ResendMailer, error)

func (*ResendMailer) Send

func (m *ResendMailer) Send(ctx context.Context, msg Message) error

type SMTPConfig

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

type SMTPMailer

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

func NewSMTPMailer

func NewSMTPMailer(cfg SMTPConfig) (*SMTPMailer, error)

func (*SMTPMailer) Send

func (m *SMTPMailer) Send(ctx context.Context, msg Message) error

Jump to

Keyboard shortcuts

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