IMAP Advanced icon

IMAP Advanced

Generic IMAP operations with threading and attachments

Thread → Get by Message

AI-generated

Summary

Retrieve all messages in a thread starting from a given message identifier, using reference headers and optional subject fallback to expand the thread context, then return normalized message listings sorted by date.

Inputs

  • mailbox — Mailbox to search in; defaults to INBOX.
  • identifierType — Type of identifier to locate the base message; defaults to UID, alternative is Message-ID.
  • uid (required) — UID of the base message; required when identifierType is UID.
  • messageId (required) — Message-ID of the base message; required when identifierType is Message-ID.
  • threadStrategy — Strategy for expanding the thread; defaults to referencesThenSubject, with option strictReferences.
  • subjectFallback — Whether to fallback to subject search when thread strategy yields limited references; defaults to false.

Output shape

An object containing the base message UID, an array of Message-IDs found as references, and a normalized array of all messages in the thread.

Each message in the returned array includes uid (number), subject (string), date (ISO date string), flags (array of IMAP flags), and matchedBy ('messageId' or 'subject') indicating how the message was matched to the thread.

Examples

Example 1: Get thread by Message-ID

Set identifierType to Message-ID and provide the Message-ID value; the node will locate the base message, parse its references, and return the full thread.

Links

Discussion