imap

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultHTTPGetAddress Default Address
	DefaultHTTPGetAddress = "https://checkip.amazonaws.com"

	// ErrNoIP No IP found in response
	ErrNoIP = errors.New("no IP in HTTP response")

	// ErrNon200Response non 200 status code in response
	ErrNon200Response = errors.New("non 200 Response found")
)

Functions

func TestImpl

func TestImpl(addr string, username string, password string)

Types

type Filter

type Filter func(message Message) bool

type MailClient

type MailClient interface {
	GetMailBoxes() ([]Mailbox, error)
	GetMessages(mailbox Mailbox, since time.Time, filter Filter) ([]Message, error)
	Move(messagesIds []uint32, destMailbox Mailbox) error
	Logout() error
}

func GetMailClient

func GetMailClient(addr, username, password string) (MailClient, error)

type Mailbox

type Mailbox string

type Message

type Message struct {
	*_imap.Message

	RawBody []byte
}

Jump to

Keyboard shortcuts

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