final MessageManager mailbox = mailboxManager.getMailbox(targetMailbox, mailboxSession);
List<IdRange> resultRanges = new ArrayList<IdRange>();
for (int i = 0; i < idSet.length; i++) {
MessageRange messageSet = messageRange(currentMailbox, idSet[i], useUids);
if (messageSet != null) {
List<MessageRange> copiedUids = mailboxManager.copyMessages(messageSet, currentMailbox.getPath(), targetMailbox, mailboxSession);
for (MessageRange mr : copiedUids) {
// Set recent flag on copied message as this SHOULD be
// done.