uidplus

package module
v0.0.0-...-506176e Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: MIT Imports: 6 Imported by: 0

README

go-imap-uidplus

GoDoc

UIDPLUS extension for go-imap

License

MIT

Documentation

Overview

Implements the IMAP UIDPLUS extension, as defined in RFC 4315.

Index

Constants

View Source
const (
	CodeAppendUid    = "APPENDUID"
	CodeCopyUid      = "COPYUID"
	CodeUidNotSticky = "UIDNOTSTICKY"
)

Additional response codes, defined in RFC 4315 section 3.

View Source
const Capability = "UIDPLUS"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a UIDPLUS client.

func NewClient

func NewClient(c *client.Client) *Client

NewClient creates a new UIDPLUS client.

func (*Client) Append

func (c *Client) Append(mbox string, flags []string, date time.Time, msg imap.Literal) (validity, uid uint32, err error)

Append is the same as Client.Append, but can also return the UID of the appended message and the UID validity of the destination mailbox. The server can choose not to return these values, in this case uid and validity will be equal to zero.

func (*Client) Copy

func (c *Client) Copy(seqset *imap.SeqSet, dest string) (validity uint32, srcUids, dstUids *imap.SeqSet, err error)

Copy is the same as Client.Copy, but can also return the source and destination UIDs of the copied messages.

func (*Client) SupportUidPlus

func (c *Client) SupportUidPlus() (bool, error)

SupportUidPlus checks if the server supports the UIDPLUS extension.

func (*Client) UidCopy

func (c *Client) UidCopy(seqset *imap.SeqSet, dest string) (validity uint32, srcUids, dstUids *imap.SeqSet, err error)

UidCopy is the same as Client.UidCopy, but can also return the source and destination UIDs of the copied messages.

func (*Client) UidExpunge

func (c *Client) UidExpunge(seqSet *imap.SeqSet, ch chan uint32) error

UidExpunge permanently removes all messages that both have the \Deleted flag set and have a UID that is included in the specified sequence set from the currently selected mailbox.

type ExpungeCommand

type ExpungeCommand struct {
	SeqSet *imap.SeqSet
}

An UID EXPUNGE command, as defined in RFC 4315 section 2.1.

func (*ExpungeCommand) Command

func (cmd *ExpungeCommand) Command() *imap.Command

func (*ExpungeCommand) Parse

func (cmd *ExpungeCommand) Parse(fields []interface{}) error

type UidPlusClient

type UidPlusClient = Client

UidPlusClient is an alias used to compose multiple client extensions.

Jump to

Keyboard shortcuts

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