smtp

package
v0.0.0-...-ef789dd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     int
	User     string
	Password string
	From     string
}

Config holds SMTP connection settings.

type Mailer

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

Mailer sends email via SMTP.

func New

func New(cfg Config) *Mailer

New creates an SMTP Mailer.

func (*Mailer) Send

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

Send delivers a message over SMTP. The context controls connection establishment and, when it carries a deadline, sets a write deadline on the underlying TCP connection.

Jump to

Keyboard shortcuts

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