The documentation for IMAP4.thread()
in the imaplib
library says
The
thread
command is a variant ofsearch
with threading semantics for the results. Returned data contains a space separated list of thread members.Thread members consist of zero or more messages numbers, delimited by spaces, indicating successive parent and child.
Thread has two arguments before the search_criterion argument(s); a threading_algorithm, and the searching charset.
It's not clear to me what to use for the threading_algorithm argument. The documentation doesn't indicate a default value, and the source code for the IMAP4.thread()
function
def thread(self, threading_algorithm, charset, *search_criteria):
"""IMAPrev1 extension THREAD command.
(type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...)
"""
name = 'THREAD'
typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)
return self._untagged_response(typ, dat, name)
doesn't give me any ideas either, even after digging into the _simple_command
helper function.
What should I use for this argument? Is there documentation elsewhere for this?