Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flags ¶
type Flags int32
Flags provide information on flags that are attached to a message
const ( FlagSeen Flags = 1 << iota FlagAnswered FlagFlagged FlagDeleted FlagDraft FlagRecent // Can not be set by client! )
Various flags that are permitted to be set/unset.
func CombineFlags ¶
CombineFlags meshes several flags into one so that all of them are set.
func FlagsFromString ¶
FlagsFromString returns the flags based on the input IMAP format string.
func (Flags) ResetFlags ¶
ResetFlags removes all set flags.
type RFC2822Message ¶
type RFC2822Message struct { Headers textproto.MIMEHeader Body string }
RFC2822Message is a message compliant with RFC 2822.
func MessageFromBytes ¶
func MessageFromBytes(msgBytes []byte) (msg RFC2822Message, err error)
MessageFromBytes creates a RFC2822Message from its byte representation.
type SequenceNumber ¶
type SequenceNumber string
SequenceNumber represents a single message identifier. Could be UID or sequence number. See RFC3501 section 9.
func (SequenceNumber) IsValue ¶
func (s SequenceNumber) IsValue() bool
IsValue returns true if the sequence number is a numeral value and not nil or *.
func (SequenceNumber) Last ¶
func (s SequenceNumber) Last() bool
Last returns true if this sequence number indicates the *last* sequence number or UID available in this mailbox. If false, this sequence number contains an integer value.
func (SequenceNumber) Nil ¶
func (s SequenceNumber) Nil() bool
Nil returns true if no sequence number was specified.
func (SequenceNumber) Value ¶
func (s SequenceNumber) Value() (uint32, error)
Value returns the integer value of the sequence number, if any is set. If Nil or Last is true (ie, this sequence number is not an integer value) then this returns 0 and an error.
type SequenceRange ¶
type SequenceRange struct { Min SequenceNumber Max SequenceNumber }
SequenceRange represents a range of identifiers. eg in IMAP: 5:9 or 15:*
func InterpretMessageRange ¶
func InterpretMessageRange(imapMessageRange string) (seqRange SequenceRange, err error)
InterpretMessageRange creates a SequenceRange from the given string in the IMAP format.
type SequenceSet ¶
type SequenceSet []SequenceRange
SequenceSet represents set of sequence ranges. eg in IMAP: 1,3,5:9,18:*
func InterpretSequenceSet ¶
func InterpretSequenceSet(imapSequenceSet string) (seqSet SequenceSet, err error)
InterpretSequenceSet creates a SequenceSet from the given string in the IMAP format.