mock

package
v3.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package mock provides a test email provider that is used in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	Messages []*email.Message
	Error    error
}

Mock implements the email.Sender interface and stores sent emails internally.

func New

func New() *Mock

New returns a new mock email.Sender.

func (*Mock) Send

func (m *Mock) Send(message *email.Message) error

Send implements email.Sender. It appends the messages to Messages field and returns the Error field.

Jump to

Keyboard shortcuts

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