emails

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package emails renders and sends the site's transactional emails.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMailer = errors.New("no mailer available")

ErrNoMailer means no SMTP server could be reached; callers fall back to showing the admin what would have been emailed.

Functions

func Reset

func Reset(to, resetURL, domain string) (mail.Mail, error)

Reset is the password reset email; domain serves the logo.

func Signup

func Signup(to, name, setupURL, domain string) (mail.Mail, error)

Signup is the welcome email carrying a new user's link to set their password. It never carries a password: an emailed password stays readable in the inbox for good.

Types

type SMTP

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

SMTP sends via the configured SMTP server, connecting per message.

func NewSMTP

func NewSMTP(init *mail.MailerInit) *SMTP

func (*SMTP) Send

func (s *SMTP) Send(ctx context.Context, m mail.Mail) error

type Sender

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

Sender sends one email.

Jump to

Keyboard shortcuts

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