}
public FetchResponse build(FetchData fetch, MessageResult result, MessageManager mailbox, ImapSession session, boolean useUids) throws MessageRangeException, ParseException, MailboxException {
final SelectedMailbox selected = session.getSelected();
final long resultUid = result.getUid();
final int resultMsn = selected.msn(resultUid);
if (resultMsn == SelectedMailbox.NO_SUCH_MESSAGE)
throw new MessageRangeException("No such message found with uid " + resultUid);
reset(resultMsn);