'Copy the specified messages to the specified mailbox.
This command is allowed in the Selected state.
@type messages: L{str}
@param messages: A message sequence set
@type mailbox: L{str}
@param mailbox: The mailbox to which to copy the messages
@type uid: C{bool}
@param uid: If true, the C{messages} refers to message UIDs, rather
than message sequence numbers.
@rtype: C{Deferred}
@return: A deferred whose callback is invoked with a true value
when the copy is successful, or whose errback is invoked if there
is an error.'

def copy(self, messages, mailbox, uid):

    if uid:
        cmd = 'UID    COPY'
    else:
        cmd = 'COPY'
    args = ('%s    %s' % (messages, _prepareMailboxName(mailbox)))
    return self.sendCommand(Command(cmd, args))
