send

package
v0.0.0-...-90b322d Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(s Sender, msg ...*msg.Message) error

Send sends emails using the given Sender.

Types

type SendCloser

type SendCloser interface {
	Sender
	Close() error
}

SendCloser is the interface that groups the Send and Close methods.

type SendFunc

type SendFunc func(from string, to []string, msg io.WriterTo) error

A SendFunc is a function that sends emails to the given addresses.

The SendFunc type is an adapter to allow the use of ordinary functions as email senders. If f is a function with the appropriate signature, SendFunc(f) is a Sender object that calls f.

func (SendFunc) Send

func (f SendFunc) Send(from string, to []string, msg io.WriterTo) error

Send calls f(from, to, msg).

type Sender

type Sender interface {
	Send(from string, to []string, msg io.WriterTo) error
}

Sender is the interface that wraps the Send method.

Send sends an email to the given addresses.

Jump to

Keyboard shortcuts

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