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

Conversation

2 participants
@aitap
Contributor

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 some commits Jun 26, 2015

add support for more complex data items in ->get
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
Revert "add support for more complex data items in ->get"
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

This comment has been minimized.

Show comment
Hide comment
@aitap

aitap Sep 19, 2015

Contributor

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?

Contributor

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