- Shipped
- August 7, 2026 at 6:45 AM UTC
- Author
- Kamo
- Commit
- 3f91aa5
GET /api/email/mailboxes/sendable answers the same question as /accessible — every address the member may send as — but as one merged stream that is searched and paged in the database. /accessible cannot serve a picker. It materializes every group in full, and for a member holding ACCESS_ALL_MEMBER_MAILBOXES that means walking every member in the org and then issuing a query per member and another per mailbox. At five figures of staff it is tens of thousands of queries and a payload to match, on every call. Only the privileged tail is paged in SQL; the member's own mailboxes, aliases and shared mailboxes are counted in Java and always sort first, so searching for your own address is never answered on page 40. A mailbox reachable through several grants is listed once, under the narrowest — the same rule the composer applies, so no identity appears twice. Rows carry the group they came from and, for another member's mailbox, its owner, so the client can render the same headings the mailbox switcher uses. Name resolution degrades exactly as MemberDisplayName does; the two have to agree or the same person reads differently in the two places.