Scan the org's mailboxes for a lead's past e-mail on request

FeatureEmailService
Ya
21 Agosti 2026, 03:35 UTC
Mwandishi
Kamo
Ahadi ya
db0b120

Serves the "Associate Past E-Mails w/ Lead" tick-box. Given a lead and the address just recorded on it, read INBOX and Sent of every mailbox in that lead's organisation back a year and attach anything carrying the address. Every guard the automatic path applies still applies, because both paths now share one classify(): an org whose addresses cannot be classified is refused, a purely internal thread is refused, and a company address is never a match candidate — so ticking the box on a lead whose e-mail is noreply@<org-domain> still associates nothing rather than handing that lead the company's whole mail stream. On top of those, the lead's own address has to actually be on the message. Runs off the request thread and single-threaded: a whole organisation's mailboxes take far longer to read than a lead save may block for, and the mail server allows only a handful of connections per user for the entire pod, so concurrency here would starve the live sweep rather than go faster. The endpoint answers 202 "queued", never "found something" — the member watches the Emails tab fill in. Folder selection moves to MailboxFolderScope so the sweep and the back-fill cannot drift on where mail lives; a timeline whose contents depended on which path found a message first would be worse than either.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei