email

package
v0.65.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment added in v0.65.1

type Attachment struct {
	Filename    string
	ContentType string
	Content     []byte
}

Attachment is a file attached to an email message.

type Email added in v0.40.5

type Email struct {
	Recipients []string
	Subject    string
	TextBody   *string
	HtmlBody   *string
}

Email is an email message without attachments.

type EmailWithAttachments added in v0.65.1

type EmailWithAttachments struct {
	Email
	Attachments []Attachment
}

EmailWithAttachments is an email message with one or more attachments.

type Sender

type Sender interface {
	SendEmail(ctx context.Context, email Email) error
}

func NewSender

func NewSender(ctx context.Context, config cfg.Config, logger log.Logger, name string) (Sender, error)

type SenderSesSettings added in v0.40.5

type SenderSesSettings struct {
	ClientName string `cfg:"client_name" default:"default"`
}

type SenderSetting added in v0.40.5

type SenderSetting struct {
	Type string `cfg:"type" default:"ses"`
}

type SenderSmtpSettings added in v0.40.5

type SenderSmtpSettings struct {
	Server string `cfg:"server"`
}

type SenderWithAttachments added in v0.65.1

type SenderWithAttachments interface {
	Sender

	SendEmailWithAttachments(ctx context.Context, email EmailWithAttachments) error
}

SenderWithAttachments supports messages with one or more attachments.

func NewSenderWithAttachments added in v0.65.1

func NewSenderWithAttachments(ctx context.Context, config cfg.Config, logger log.Logger, name string) (SenderWithAttachments, error)

func NewSesSender added in v0.40.5

func NewSesSender(ctx context.Context, config cfg.Config, logger log.Logger, name string) (SenderWithAttachments, error)

func NewSesSenderWithInterfaces added in v0.40.5

func NewSesSenderWithInterfaces(logger log.Logger, client gosoSES.Client, clock clock.Clock, fromAddress string) SenderWithAttachments

func NewSmtpSender added in v0.40.5

func NewSmtpSender(config cfg.Config, name string) (SenderWithAttachments, error)

func NewSmtpSenderWithInterfaces added in v0.40.5

func NewSmtpSenderWithInterfaces(clientFactory clientFactory, uuid uuid.Uuid, clock clock.Clock, fromAddress string) SenderWithAttachments

type SmtpClient added in v0.40.5

type SmtpClient interface {
	SendMail(from string, to []string, msg io.Reader) (err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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