queue

package
v0.0.0-...-74f1e5b Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: GPL-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 Item

type Item struct {
	Username string // Second command: AUTH
	Password string
	MailFrom string // Third command: MAIL
	MailOpts smtp.MailOptions
	Rcpt     []string // Fourth command: RCPT (can be called multiple times)
	Data     []byte   // Fifth command: DATA
}

Item i a snapshot of SMTP commands

type Queue

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

func New

func New(db *bbolt.DB, log *logger.Logger) (*Queue, error)

New queue

func (*Queue) Add

func (q *Queue) Add(item *Item) error

Add item to cache

func (*Queue) Process

func (q *Queue) Process()

Process the queue

func (*Queue) SetPing

func (q *Queue) SetPing(function func() bool)

SetPing function

func (*Queue) SetSendmail

func (q *Queue) SetSendmail(function func(*Item) error)

SetSendmail function

Jump to

Keyboard shortcuts

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