{"content":"imapflow: Modern IMAP client. Connect: new ImapFlow({ host, port, secure, tls, auth: { user, pass } }). Get mailbox lock: client.getMailboxLock('INBOX'). Search: client.search({ from: sender }, { uid: true }) returns UIDs. FetchAll: client.fetchAll(uids, { envelope: true, bodyStructure: true }, { uid: true }). Download part: client.download(uid, partId, { uid: true }) returns { content: Stream }. Use fetchAll() first, then process - avoids IMAP deadlock. STARTTLS: secure=false + tls={rejectUnauthorized: false} + port 587. TLS: secure=true + port 993. None: secure=false + tls.ignoreTLSErrors=true or disableCompression.","source":"web","provider":"websearch","confidence":"LOW","fetched_at":"2026-06-26T12:30:25.576Z","ttl":86400000,"kind":"docs"}