mailer

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-2.0, GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.16.0

type Config struct {
	Host     string
	Port     string
	Username string
	Password string
}

Config is a config for SMTP mailer.

type Mailer

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

Mailer is a mailer that sends emails.

func New

func New(cfg Config) *Mailer

func (*Mailer) Send

func (m *Mailer) Send(
	ctx context.Context,
	from string,
	to []string,
	subject, body string,
	attachments []string,
) error

SendMail sends an email.

Jump to

Keyboard shortcuts

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