summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/imaplib.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index d9166e0..8004982 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -69,6 +69,7 @@ Commands = {
'STATUS': ('AUTH', 'SELECTED'),
'STORE': ('SELECTED',),
'SUBSCRIBE': ('AUTH', 'SELECTED'),
+ 'THREAD': ('SELECTED',),
'UID': ('SELECTED',),
'UNSUBSCRIBE': ('AUTH', 'SELECTED'),
}
@@ -679,6 +680,16 @@ class IMAP4:
return self._simple_command('SUBSCRIBE', mailbox)
+ def thread(self, threading_algorithm, charset, *search_criteria):
+ """IMAPrev1 extension THREAD command.
+
+ (type, [data]) = <instance>.thread(threading_alogrithm, charset, search_criteria, ...)
+ """
+ name = 'THREAD'
+ typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)
+ return self._untagged_response(typ, dat, name)
+
+
def uid(self, command, *args):
"""Execute "command arg ..." with messages identified by UID,
rather than message number.