edgeport - v1.0.3
    Preparing search index...

    Function connect

    • Connects to a POP3 server and authenticates, returning a ready session.

      Opens the transport (implicit TLS or STLS), runs USER/PASS, and hands back a Pop3Session. A rejected PASS surfaces as AuthError; any other command-level failure surfaces as ProtocolError.

      Parameters

      Returns Promise<Pop3Session>

      The authenticated session.

      If the server rejects the credentials.

      If the connection cannot be established.

      If the server speaks the protocol incorrectly.

      1.0.0

      import { connect } from 'edgeport/pop3';

      await using session = await connect({
      hostname: 'pop.example.com',
      auth: { username: 'me', password: 'secret' }
      });
      const { count } = await session.stat();
      if (count > 0) {
      const first = await session.retrieve(1);
      }