Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 21, 2016
Merged

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

merged 3 commits into from
Aug 21, 2016

Conversation

aitap
Copy link
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

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
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