Hello,

This is a reply to an e-mail that you wrote on Thu, 17 Jul 2003 at
15:10, lines prefixed by '>' were originally written by you.
> Forgive me for bothering you again with such a silly question, but
say
> want to connect as localhost with password "PASS".  How could I
call
> the
> function?

No problem, very basic usage (with no error checking) would be as
follows...

$popclient = new POPClient("serveraddress","username","password");
$popclient->Connect();
$messagecount = $popclient->MessageCount();
for($i=0;$i<$messagecount;$i++){
    $messageheaders = $popclient->RetrieveMsg($i, TRUE);
    // do something with the headers here
}

The above code assumes you have a constructor function in the class
(the one I posted originally didn't include it).  Add this function
to the class to make it work...
    function POPClient($server, $user, $pass, $port=110){
        $this->server = $server;
        $this->user = $user;
        $this->pass = $pass;
        $this->port = $port;
        $this->connected = FALSE;
        $this->messagesource = "";
    }

HTH,

David

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to