IMAP PEEK support
This commit is contained in:
parent
47c6f35f5a
commit
a0d02afc69
@ -57,6 +57,7 @@ public:
|
|||||||
FULL_HEADER = (1 << 5), /**< Full RFC-[2]822 header. */
|
FULL_HEADER = (1 << 5), /**< Full RFC-[2]822 header. */
|
||||||
UID = (1 << 6), /**< Unique identifier (protocol specific). */
|
UID = (1 << 6), /**< Unique identifier (protocol specific). */
|
||||||
IMPORTANCE = (1 << 7), /**< Header fields suitable for use with misc::importanceHelper. */
|
IMPORTANCE = (1 << 7), /**< Header fields suitable for use with misc::importanceHelper. */
|
||||||
|
PEEK = (1 << 8), /**< Use IMAP PEEK method when accessing HEADER fields. */
|
||||||
|
|
||||||
CUSTOM = (1 << 16) /**< Reserved for future use. */
|
CUSTOM = (1 << 16) /**< Reserved for future use. */
|
||||||
};
|
};
|
||||||
|
@ -964,7 +964,8 @@ int IMAPFolder::getFetchCapabilities() const {
|
|||||||
return fetchAttributes::ENVELOPE | fetchAttributes::CONTENT_INFO |
|
return fetchAttributes::ENVELOPE | fetchAttributes::CONTENT_INFO |
|
||||||
fetchAttributes::STRUCTURE | fetchAttributes::FLAGS |
|
fetchAttributes::STRUCTURE | fetchAttributes::FLAGS |
|
||||||
fetchAttributes::SIZE | fetchAttributes::FULL_HEADER |
|
fetchAttributes::SIZE | fetchAttributes::FULL_HEADER |
|
||||||
fetchAttributes::UID | fetchAttributes::IMPORTANCE;
|
fetchAttributes::UID | fetchAttributes::IMPORTANCE |
|
||||||
|
fetchAttributes::PEEK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -691,7 +691,11 @@ shared_ptr <IMAPCommand> IMAPUtils::buildFetchCommand(
|
|||||||
list += *it;
|
list += *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
items.push_back("BODY[HEADER.FIELDS (" + list + ")]");
|
if (options.has(fetchAttributes::PEEK)) {
|
||||||
|
items.push_back("BODY.PEEK[HEADER.FIELDS (" + list + ")]");
|
||||||
|
} else {
|
||||||
|
items.push_back("BODY[HEADER.FIELDS (" + list + ")]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user