imap_find_email_by_message_id
Locate an email by its RFC822 Message-ID across folders to retrieve its current folder, UID, and envelope, even if moved or archived.
Instructions
Locate an email by its RFC822 Message-ID across folders and return its current { folder, uid } plus basic envelope. Robust to the message having been moved or archived (IMAP UIDs are folder-relative). Pass the returned folder + uid to imap_reply_to_email or imap_get_email. Without folders, searches Gmail \All Mail when present, else INBOX → Archive → Sent → remaining folders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folders | No | Explicit folders to search, in order (overrides the default order) | |
| accountId | Yes | Account ID | |
| messageId | Yes | RFC822 Message-ID, with or without angle brackets |