npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tien-thuy/pop3-server

v0.0.1

Published

POP3 server

Readme

Power by Hương Đá Group 🇻🇳

Tien Thủy / POP3 Server

Provide a simple POP3 server. Ready for production.

Requirements

Node --- >= v20 or newer

Installation

npm install @tien-thuy/pop3-server

Usage

import POP3 from '@tien-thuy/pop3-server';

const pop3Server = new POP3Server({
  host: '127.0.0.1',
  port: 110,
  TLSOptions: {
    enable: false
  }
});

Options

| Name | Required | Type | Default value | Description | |-----------------------|-------------------------------------------|------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | host | true | string | | Hostname of your server, default is localhost | | port | true | number | | Port to listen on, default is 110 | | welcomeMessage | false | string | Welcome to my POP3 server! | Welcome message sent to clients upon successful connection. | | TLSOptions.enable | false | boolean | false | Enable TLS support, default is false. If you want to use TLS, please provide a certificate and key file path in TLSOptions.certPath and TLSOptions.keyPath, otherwise it will throw an error. | | TLSOptions.key | true if TLSOptions.enable is true | string | 0 | Path to private key file, required if enable is true | | TLSOptions.cert | true if TLSOptions.enable is true | string | 0 | Path to public certificate file, required if enable is true | | TLSOptions.ca | true if TLSOptions.enable is true | string | 0 | Path to CA certificate file, optional if enable is true | | idleTimeout | false | number | 0 | Timeout in milliseconds after which the server will automatically disconnect idle connections. Default is 60000 (1 minute). | | maxConnections | false | number | unlimited | Maximum number of concurrent connections allowed. Default is 50. | | idLength | false | number | | Length of generated unique IDs. Default is 32. | | storage | false | object | | Storage options. See Storage section below for details. | | storage.get | false | function | | Function that returns a storage instance. This can be used to customize how messages are stored and retrieved. | | storage.set | false | function | | Function that stores a message. This can be used to customize how messages are stored and retrieved. | | storage.destroy | false | function | | Function that deletes a message. This can be used to customize how messages are deleted. | | storage.list | false | function | | Function that lists all messages. This can be used to customize how messages are listed. |

Events

| Event Name | Parameters | Description | |--------------------|----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------| | connect | event: { id: string; remoteAddress: string; secure: boolean } | Emitted when a new connection is established. | | close | None | Emitted when the server is closed. | | LOGIN | event: { connection: POP3Connection; username: string; password: string; auth: (success: boolean) => void; } | Emitted when a login attempt is made. Use auth to approve or deny the login. | | QUIT | event: POP3Connection | Emitted when a quit command is received. | | STAT | connection: POP3Connection, callback: (messageCount: number, totalSize: number) => void | Emitted when a STAT command is received. Provide number of messages and size. | | LIST | connection: POP3Connection, messageNumber?: number, callback: (messages: { number: number; size: number }[] | Emitted when a LIST command is received. Provides a list of emails. | | RETR |connection: POP3Connection, messageNumber: number, callback: (content: string) => void | Emitted when a RETR command is received. Return email content. | |DELE |connection: POP3Connection, messageNumber: number | Emitted when a DELETE command is received. Marks the email for deletion. | |NOOP |connection: POP3Connection | Emitted when a NOOP command is received. | |RSET |connection: POP3Connection | Emitted when a RSET command is received. Resets all marked deletions. | |CAPA |connection: POP3Connection, callback: (capabilities: string[]) => void | Emitted when a CAPA command is received. Provide server capabilities. | |connection:close|connection: POP3Connection | Emitted when a connection is closed. | |data |event: { connection: POP3Connection; data: Buffer } | Emitted when data is received from a connection. | |timeout |event: POP3Connection | Emitted when a connection times out. | |listening |info: { address: string; port: number; secure: boolean } | Emitted when the server starts listening for connections. | |error |error: Error` | Emitted when an error occurs. |