module Net::IMAP::BodyStructure

Net::IMAP::BodyStructure is included by all of the structs that can be returned from a "BODYSTRUCTURE" or "BODY" FetchData#attr value. Although these classes don’t share a base class, this module can be used to pattern match all of them.

See [IMAP4rev1] §7.4.2 and [IMAP4rev2] §7.5.2 for full description of all BODYSTRUCTURE fields, and also Message envelope and body structure at Net::IMAP for other relevant RFCs.

Classes that include BodyStructure

BodyTypeBasic

Represents any message parts that are not handled by BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.

BodyTypeText

Used by text/* parts. Contains all of the BodyTypeBasic fields.

BodyTypeMessage

Used by message/rfc822 and message/global parts. Contains all of the BodyTypeBasic fields. Other message/* types should use BodyTypeBasic.

BodyTypeMultipart

for multipart/* parts

Deprecated BodyStructure classes

The following classes represent invalid server responses or parser bugs:

BodyTypeExtension

parser bug: used for message/* where BodyTypeBasic should have been used.

BodyTypeAttachment

server bug: some servers sometimes return the “Content-Disposition: attachment” data where the entire body structure for a message part is expected.