testkit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testkit provides test doubles for mailkit consumers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender struct {
	Messages []mailkit.Message
	Err      error
}

Sender keeps the messages it is given rather than delivering them, refusing a recipient and a cancelled context as a delivering sender does. Err forces a delivery failure. It holds no lock, so a test sending from several goroutines synchronizes itself.

func (*Sender) Send

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

Send keeps m, or answers the recipient refusal, the cancelled context, or the configured failure.

Jump to

Keyboard shortcuts

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