Documentation
¶
Overview ¶
Package mailtest provides a mail.Sender for tests: it records the messages it is given instead of delivering them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sender ¶
type Sender struct {
// Err, when set, is returned by every Send.
Err error
// contains filtered or unexported fields
}
Sender records every message it sends. It rejects an invalid message with mail.ErrInvalidMessage, exactly as a real sender would. When Err is set, Send returns it and records nothing. A Sender is safe for concurrent use; its zero value is ready to use.
Click to show internal directories.
Click to hide internal directories.