sender

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 2 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail struct {
	From    mail.Address
	To      []mail.Address
	Cc      []mail.Address
	Bcc     []mail.Address
	Subject string
	Text    string
	Html    string

	// Headers holds extra headers only, such as List-Unsubscribe and
	// List-Unsubscribe-Post (RFC 8058). From, To, Cc, Bcc and Subject stay in
	// their own fields and must not be set here.
	Headers map[string]string `json:",omitempty"`
}

type Sender

type Sender interface {
	Send(ctx context.Context, mail *Mail) error
}

Sender delivers a mail. Queueing it in the database, to send it only if a transaction commits, is the application's business: a queue is a repository that hands stored mails to a Sender.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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