class Net::IMAP::FetchStruct

Net::IMAP::FetchStruct is the superclass for FetchData and UIDFetchData. Net::IMAP#fetch, Net::IMAP#uid_fetch, Net::IMAP#store, and Net::IMAP#uid_store all return arrays of FetchStruct objects.

Fetch attributes

See [IMAP4rev1 ยง7.4.2] and [IMAP4rev2 ยง7.5.2] for a full description of the standard fetch response data items, and Message envelope and body structure at Net::IMAP for other relevant RFCs.

Static fetch data items

Most message attributes are static, and must never change for a given (server, account, mailbox, UIDVALIDITY, UID) tuple.

The static fetch data items defined by both IMAP4rev1 and IMAP4rev2 are:

IMAP4rev2 adds the additional fetch items from the BINARY extension [RFC3516]:

Several static message attributes in IMAP4rev1 are obsolete and been removed from IMAP4rev2:

Net::IMAP supports static attributes defined by the following extensions:

NOTE:

Additional static fields are defined in other IMAP extensions, but Net::IMAP canโ€™t parse them yet.

Dynamic message attributes

Some message attributes can be dynamically changed, for example using the STORE command.

The only dynamic message attribute defined by IMAP4rev1 and IMAP4rev2 is:

Net::IMAP supports dynamic attributes defined by the following extensions:

NOTE:

Additional dynamic fields are defined in other IMAP extensions, but Net::IMAP canโ€™t parse them yet.

Implicitly setting \Seen and using PEEK

Unless the mailbox has been opened as read-only, fetching BODY[#{section}] or BINARY[#{section}] will implicitly set the \Seen flag. To avoid this, fetch using BODY.PEEK[#{section}] or BINARY.PEEK[#{section}] instead.

NOTE:

The data will always be returned without the ".PEEK" suffix, as BODY[#{specifier}] or BINARY[#{section}].