smtp_server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.0.2

func Run(ctx context.Context, logger *zap.Logger, port int) error

Run ...

func RunWithServerStarter added in v0.0.2

func RunWithServerStarter(ctx context.Context, logger *zap.Logger, l net.Listener) error

RunWithServerStarter ...

Types

type Backend

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

The Backend implements SMTP server methods.

func (*Backend) AnonymousLogin

func (be *Backend) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, error)

AnonymousLogin requires clients to authenticate using SMTP AUTH before sending emails

func (*Backend) Login

func (be *Backend) Login(state *smtp.ConnectionState, username, password string) (smtp.Session, error)

Login handles a login command with username and password.

type Session

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

A Session is returned after successful login.

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) 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