Skip to content

Add support for data items (not just body part specifiers) in ->get#6

Merged
jettero merged 3 commits into
jettero:masterfrom
aitap:fetch-specifiers
Aug 21, 2016
Merged

Add support for data items (not just body part specifiers) in ->get#6
jettero merged 3 commits into
jettero:masterfrom
aitap:fetch-specifiers

Conversation

@aitap
Copy link
Copy Markdown
Contributor

@aitap aitap commented Jun 26, 2015

See https://tools.ietf.org/html/rfc3501#section-6.4.5 for examples.

Note: some data items may be recognised as body part specifiers. We may end up creating another method to FETCH messages' data items because distinguishing data items/body part specifiers may require parsing IMAP requests. For example,
this is a data item: (FLAGS BODY[HEADER.FIELDS (DATE FROM)])
this is a data item: (FLAGS INTERNALDATE RFC822.SIZE)
this is a data item: BODYSTRUCTURE
this is a body part specifier: HEADER.FIELDS (DATE FROM)
this is a body part specifier: 4.2.TEXT

aitap added 3 commits June 26, 2015 21:00
see https://tools.ietf.org/html/rfc3501#section-6.4.5 for examples
Note: some data items may be recognised as body part specifiers;
to work around that, wrap them in parentheses
This reverts commit 7bd48d6.

In order not to break the API and preseve the wrapping in "BODY[...]"
behaviour, leave ->get alone, but introduce another method ->fetch,
which only sets $part to RFC822 if the $part is missing, but doesn't
wrap anything.

Conflicts:
	Simple.pm
@aitap
Copy link
Copy Markdown
Contributor Author

aitap commented Sep 19, 2015

It looks like changing the "BODY[...]" wrapping behavior of ->get is going to break some apps no matter what. Could adding another method which doesn't wrap be a solution?

@jettero jettero merged commit b48b61f into jettero:master Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants