mail

package
v0.9.0-rc.53 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mail delivers the few messages the site sends by itself.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSender = errors.New("mail: no from address is configured")

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     string
	Username string
	Password string
	UseTLS   bool
	Implicit bool
	From     string
}

type Console

type Console struct {
	Log *slog.Logger
}

func (*Console) Send

func (c *Console) Send(_ context.Context, to []string, subject, body string) error

type SMTP

type SMTP struct {
	Config
}

func (*SMTP) Send

func (s *SMTP) Send(ctx context.Context, to []string, subject, body string) error

type Sender

type Sender interface {
	Send(ctx context.Context, to []string, subject, body string) error
}

func New

func New(c Config) Sender

Jump to

Keyboard shortcuts

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