messengers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailMessenger

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

EmailMessenger sends emails using an SMTP connection pool

func NewEmailMessenger

func NewEmailMessenger(cfg config.SMTPConfig, logger *slog.Logger) (*EmailMessenger, error)

NewEmailMessenger creates a new EmailMessenger with the given SMTP configuration

func (*EmailMessenger) Close

func (e *EmailMessenger) Close()

Close closes the SMTP connection pool

func (*EmailMessenger) Send

func (e *EmailMessenger) Send(msg Message) error

Send sends an email message to all recipients

type Message

type Message struct {
	Title      string
	Body       string
	Recipients []Recipient
}

type Messenger

type Messenger interface {
	Send(message Message) error
	Close()
}

type Recipient

type Recipient struct {
	UUID  string
	Email string
}

Jump to

Keyboard shortcuts

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