resolve-message-id
Converts IMAP message IDs to numeric AppleScript IDs needed for applying flag colors, since IMAP flags lack color support.
Instructions
Use when: you have imap: message id(s) and need the numeric Mail.app id(s) — most importantly to apply a flag COLOR, which only sticks on the AppleScript numeric-id path (IMAP \Flagged is colorless, so a smart mailbox keyed on flag color never matches an IMAP-flagged message). Each imap: id is resolved via its RFC822 Message-ID.
Returns: for each input id, its numericId (the AppleScript id) or null when it can't be resolved, plus the messageId used; and a resolvedCount.
Do not use when: your ids are already numeric (they pass straight through), or you don't need a color — flag/move/mark tools operate on imap: ids directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| resolved | No | ||
| resolvedCount | No |