From: Karim Hamidou Date: Tue, 1 Nov 2016 19:11:29 +0000 (-0700) Subject: Add support for the MOVE command. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=refs%2Fheads%2Fadd_move_support;p=imapclient.git Add support for the MOVE command. See RFC 6851 (https://tools.ietf.org/html/rfc6851) for more details. --- diff --git a/imapclient/imapclient.py b/imapclient/imapclient.py index 969b605..aad37ec 100644 --- a/imapclient/imapclient.py +++ b/imapclient/imapclient.py @@ -1029,6 +1029,18 @@ class IMAPClient(object): self._normalise_folder(folder), uid=True, unpack=True) + + def move(self, messages, folder): + """Move one or more messages from the current folder to + *folder*. Returns the MOVE response string returned by the + server. + """ + return self._command_and_check('move', + join_message_ids(messages), + self._normalise_folder(folder), + uid=True, unpack=True) + + def expunge(self): """Remove any messages from the currently selected folder that have the ``\\Deleted`` flag set.