mail

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrActionAborted = &smtp.SMTPError{
		Code:         451,
		EnhancedCode: smtp.EnhancedCode{4, 5, 1},
		Message:      "Action aborted: Local error in processing",
	}
	ErrMailboxUnavailable = &smtp.SMTPError{
		Code:         550,
		EnhancedCode: smtp.EnhancedCode{5, 5, 0},
		Message:      "Requested action not taken: mailbox unavailable",
	}
	ErrBadSequence = &smtp.SMTPError{
		Code:         503,
		EnhancedCode: smtp.EnhancedCode{5, 0, 3},
		Message:      "Bad sequence of commands",
	}
)

Functions

This section is empty.

Types

type Backend

type Backend struct{}

the backend implements SMTP server methods

func NewBackend

func NewBackend() *Backend

NewBackend create new SNTP backend

func (*Backend) NewSession

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

type Session

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

func NewSession

func NewSession() *Session

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, opts *smtp.RcptOptions) 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