memory

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: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

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

Sender records every sent message.

func New

func New() *Sender

New returns an empty recording sender.

func (*Sender) Last

func (s *Sender) Last() (email.Message, bool)

Last returns the last recorded message.

func (*Sender) Messages

func (s *Sender) Messages() []email.Message

Messages returns a copy of the recorded messages.

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, m email.Message) error

Send records the message.

Jump to

Keyboard shortcuts

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