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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pop3

v0.2.0

Published

Nodejs library implementing the POP3 protocol

Downloads

44

Readme

##pop3

pop3 is a Nodejs library implementing the POP3 protocol. The client library implements RFC 1939 and TLS support.

Demo

A demo is available under the demo folder. An interactive demo is available at demo/interactive.js. This illustrates how this library can be used to run synchronously. A sample session is as follows:

host: pop.mail.yahoo.com +OK hello from popgate-0.8.0.504347 pop108.mail.gq1.yahoo.com command: user USERNAME +OK password required. command: pass PASSWORD +OK maildrop ready, 4077 messages (875008486 octets) (1634370939) command: stat +OK 4077 875008486 command: list 1 +OK 1 2519 command: uidl 10 +OK 10 7986d57effb584a2cc3329bda1e0d11e command: quit +OK server signing off. command: To run the basic demo edit the demo/basic.js to replace HOST, USERNAME and PASSWORD with your mailbox settings. If you need async operation use the setCallback method instead of synchronize.

API

connect (host, secure, port)

Creates a socket connection to the host and port. If secure is true, TLS is used. Returns (or calls back) when the greeting is received from the server. If successful, the connection enters the autorize state.

user (username)

Issues the USER pop3 command.

pass (password)

Issues the PASS pop3 command. If successful, the connection enters the transaction state.

apop (username, password) Issues the APOP pop3 command. If successful, the connection enters the transaction state.

stat ()

Issues the STAT command.

list ([msgNo])

Issues the LIST pop3 command. If the optional msgNo is provided, then LIST msgNo is issued. Otherwise the multi-line reply is parsed into an array.

retr (msgNo)

Issues the RETR msgNo pop3 command.

noop ()

Issues the NOOP pop3 command.

rset ()

Issues the RSET pop3 command.

dele (msgNo)

Issues the DELE msgNo pop3 command.

quit ()

Issues the QUIT pop3 command.

top (msgNo, lines)

Issues the TOP msgNo lines pop3 command.

uidl ([msgNo])

Issues the UIDL command. If the optional msgNo is provided, then UIDL msgNo is issued. Otherwise the multi-line reply is parsed into an array.