POP3 commands can be performed with PHP's
fgets() functions. The
LIB_pop3 library is available for you to download from this book's website. This library contains functions for connecting to the mail server, authenticating your account on the server, finding out what mail is available for the account, requesting messages from the server, and deleting messages.
The scripts in Listings 15-10 through 15-13 show how to use the
LIB_pop3 library. The larger script is split up and annotated here for clarity, but it is available in its entirety on this book's website.
Before you use the script in Listing 15-10, replace the values for
PASS with your email account information. ...