v0.0.0-...-6503209 Latest Latest

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

Go to latest
Published: Feb 23, 2024 License: LGPL-3.0 Imports: 12 Imported by: 0




View Source
const (
	IMAPFlagDeleted = "\\Deleted"
	IMAPFlagSeen    = "\\Seen"

Common IMAP message flags.


This section is empty.


This section is empty.


type Conn

type Conn struct {
	// contains filtered or unexported fields

Conn knows just enough about the IMAP protocol to run a simple prober (not enough for a real, functional client).

func Dial

func Dial(ctx context.Context, addr string, conf *tls.Config, log *log.Logger, dnsMap map[string]string) (*Conn, error)

Dial a remote IMAP server (with mandatory TLS). The IMAP connection is bound to the lifetime of the Context.

func (*Conn) Close

func (c *Conn) Close() error

Close the IMAP connection.

func (*Conn) Expunge

func (c *Conn) Expunge() error

Expunge the current mailbox.

func (*Conn) Fetch

func (c *Conn) Fetch(uid string) (string, error)

Fetch a message, returns the whole rfc-822 body.

func (*Conn) LoginSASL

func (c *Conn) LoginSASL(username, password string) error

LoginSASL performs a login with SASL AUTH PLAIN mechanism.

func (*Conn) Search

func (c *Conn) Search(qstr string) ([]string, error)

Search the current mailbox for a given query string.

func (*Conn) Select

func (c *Conn) Select(mbox string) error

Select a mailbox.

func (*Conn) Store

func (c *Conn) Store(uid, flags string) error

Store new flags for a message.

Jump to

Keyboard shortcuts

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