mail

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	*smtp.Server

	Msg       map[string]Message
	OnMessage func(*Message)
	// contains filtered or unexported fields
}

func New

func New(addr string, f ...func(*smtp.Server)) *Backend

func (*Backend) NewSession

func (b *Backend) NewSession(_ *smtp.Conn) (smtp.Session, error)

func (*Backend) Start

func (b *Backend) Start()

type Message

type Message struct {
	From string
	To   []string
	Data string
}

type Session

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

func (*Session) AuthPlain

func (s *Session) AuthPlain(username, password string) error

func (*Session) Data

func (s *Session) Data(r io.Reader) error

func (*Session) Logout

func (s *Session) Logout() error

func (*Session) Mail

func (s *Session) Mail(from string, opts *smtp.MailOptions) error

func (*Session) Rcpt

func (s *Session) Rcpt(to string) error

func (*Session) Reset

func (s *Session) Reset()

Jump to

Keyboard shortcuts

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