Reading POP mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Reading POP mail

Post by dstefani »

Hey Kids,
I need to read mail from various POP accounts without having Lib::IMAP installed. Just using basic PHP installation. I've seen applications that say they do this but there are a ton of files to go through and all I want to do is find out the basic core of the functionality of how to access the mail, after that I've got to do a bunch of fun and interesting things with it ;-)
If you can give me a big hint or point me toward a tutorial that would be great. If not, I guess it's time to dig through code. 8O

Thanks,
- D
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if you want to know how pop3 works, it's defined in rfc1939
you can test it with a simple telnet-application if you like. Simple connect to the pop3 port (which is by default 110), wait for the welcome-message and type
USER <accountname>
-wait for reply (starts with +OK if successful)
PASS <pasword>
-again wait for reply
LIST
-view the list of available messages, if there is any
TOP 1 10
-read the first lines of the first message
QUIT
-the message will not be deleted, don't worry ;)


if you're looking for a php-class maybe http://www.hotscripts.com/Detailed/3980.html is useful (didn't take a look at it but at least it has a good rating)
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post by dstefani »

Very cool, thank you.
I'm looking at the POP3 Class right now. It uses PHP Network Functions for connecting which requires NO extra libraries, just the PHP core, that's just what I needed to find out.
Your post was VERY helpful, thanks again,
- D
Post Reply