* @param responder
* @throws MailboxException
*/
protected void processMessageRanges(final ImapSession session, final MessageManager mailbox, final List<MessageRange> ranges, final FetchData fetch, final boolean useUids, final MailboxSession mailboxSession, final Responder responder) throws MailboxException {
final FetchResponseBuilder builder = new FetchResponseBuilder(new EnvelopeBuilder(session.getLog()));
FetchGroup resultToFetch = getFetchGroup(fetch);
for (int i = 0; i < ranges.size(); i++) {
MessageResultIterator messages = mailbox.getMessages(ranges.get(i), resultToFetch, mailboxSession);
while (messages.hasNext()) {
final MessageResult result = messages.next();