I want to create a gmail client with the ability to view emails as conversations (threads). In imaplib, there is a method: IMAP4.thread(threading_algorithm, charset, search_criterion[, ...]) I think it could be the solution. Anybody has experience using it? Please give an example. Thanks.
Asked
Active
Viewed 1,480 times
4
-
1You should add the labels 'python' and 'email' and remove 'multithreading'. – jbrown Feb 24 '11 at 17:23
2 Answers
1
That method is simply a wrapper to the IMAP4rev1 extension THREAD command. Have a look at this link which describes how that IMAP command works: https://www.rfc-editor.org/rfc/rfc5256
However, I'm not sure that Gmail actually implements the THREAD command. If it does, it should list 'THREAD=' among its capabilities.

Mark Amery
- 143,130
- 81
- 406
- 459

Martin Melin
- 111
- 1
0
As far as I know, Gmail uses an algorithm that is private, and it's not stated in RFCs.
They use a combination of headers (like in-reply-to and references) and considering subject (but in a different way that THREAD=references does).

Mark Amery
- 143,130
- 81
- 406
- 459

Arash Pourzarabi
- 3
- 2
-
Most of what they do is probably covered here: https://cr.yp.to/immhf/thread.html – tripleee Jul 14 '22 at 08:00