email

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package email defines the Email Adapter contract. The core and plugins decide WHAT to send (verification, password reset, magic link); adapters (SMTP, SES, SendGrid, Postmark, ...) decide HOW it is physically delivered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	To      string
	Subject string
	Text    string
	HTML    string
}

Message is a transactional email.

type Sender

type Sender interface {
	Send(ctx context.Context, message Message) error
}

Sender delivers email messages.

type SenderFunc

type SenderFunc func(ctx context.Context, message Message) error

SenderFunc adapts a function into a Sender.

func (SenderFunc) Send

func (f SenderFunc) Send(ctx context.Context, message Message) error

Send calls f(ctx, message).

Directories

Path Synopsis
Package memory provides a fake email.Sender that records messages in memory, for tests and local development.
Package memory provides a fake email.Sender that records messages in memory, for tests and local development.

Jump to

Keyboard shortcuts

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