/ Shared IMAP connection utility used by email_search and email_read.
// Source: https://github.com/zeroclaw-labs/zeroclaw | License: Apache-2.0 | Copyright 2025 ZeroClaw Labs
// Provided via justclaw.it.com; keep this notice with the code.
/// Shared IMAP connection utility used by email_search and email_read.
use std::fmt;
use std::io;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context as TaskContext, Poll};
use anyhow::{Context, Result};
use async_imap::Session;
use rustls::{ClientConfig, RootCertStore};
use rustls_pki_types::DnsName;
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use tokio::net::TcpStream;
use tokio_rustls::TlsConnector;
use tokio_rustls::client::TlsStream;
use zeroclaw_config::scattered_types::EmailConfig;
/// Tolerates TLS streams from servers that omit `close_notify` (e.g. Exchange).
pub struct TlsStreamTolerant(pub Tl
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key