Connection and credential options.
The authenticated session.
import { connect } from 'edgeport/imap';
await using session = await connect({
hostname: 'imap.example.com',
auth: { username: 'me', password: 'secret' }
});
await session.select('INBOX');
const uids = await session.search({ unseen: true });
const messages = await session.fetch(uids, { flags: true, body: true });
Connects to an IMAP server and logs in, returning a ready session.
Opens the transport (implicit TLS or STARTTLS), runs
LOGIN, and hands back an ImapSession. A failed login surfaces as AuthError; any other protocol-level rejection surfaces as ProtocolError.