pymap.threads

class pymap.threads.ThreadKey(msg_id, subject)[source]

Represents a hashable key used to link messages as members of the same thread.

The thread key is composed of a single message ID from the Message-Id, In-Reply-To, or References headers, along with a normalized version of the Subject header. If two messages share a single thread key, they should be assigned the same thread_id.

Parameters:
  • msg_id (str) – The message ID bytestring.

  • subject (str) – The normalized subject bytestring.

classmethod get_all(header)[source]

Return all the thread keys from the message headers.

Parameters:

header (MessageHeader) – The message header.

Return type:

Sequence[ThreadKey]