Re: Parsing POP3 Mailbox

From: Date: Thu, 17 Jul 2003 14:19:18 +0000
Subject: Re: Parsing POP3 Mailbox
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155620@lists.php.net to get a copy of this message
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)

« previous php.general (#155620) next »