I’m trying to just do some simple things with imap/pop. But found that the functions don’t exist on DH’s servers. I read the documentation and it needs to use the c-client library which I guess isn’t installed. I don’t really want to compile my own php.

Anyway a few questions.
1)Is this common on other hosts? If everything goes as planned, I intend on releasing this software I’m making. So if it’s not on other hosts, I’ll need to think of something else.
2) I downloaded the Squirrel email client and looked through the code. It seems to be using fsockopen and fgets… and specially created string commands.
Is there a web page with how to do this sort of thing, or a free library of functions that I could integrate with my program?


Well, you know the annoying nerd answer is to read the RFC for IMAP4rev1, but that’s not really necessary.

Just follow the guidelines of SquirrelMail. IMAP, when you’re not trying to be too fancy, is a really simple protocol and is pretty manageable just using sockets like the SM folks do.



Still having some problems…
What ports do I use for the scripts, both IMAP & SMTP? (kbase says 587 or 25, script says 143)
What mail server? (
What user name do I use? ( or just uname)
Password has to be encrypted first or does it just use plain text passwords?
Does it use “CRAM-MD5, DIGEST-MD5, Plain, and TLS”?

I get a connection dropped using port 587, and a unknown user name and password with defaults of 143 for imap, and 25 for smtp.

EDIT: I’ve tried all of those login methods.
What type of IMAP server is it?
courier, cyrus, exchange, uw, macosx, hmailserver, other?