. On Jul 26, 2008, at 5:04 AM, Derick Rethans wrote: > On Fri, 25 Jul 2008, Dave Fischetti wrote: > >> I figure I can check to see if there are messages first, is that a >> good idea? which is the better way to do that? > > Yes, you should check for this first. > >> $messages = $pop3->listMessages(); >> and check the length of the array >> >> or using >> >> $pop3->status( $num, $size ); >> and check the value of $num? would this be slower? > > The latter is faster, as only one line of data is returned from the > server. The first one could potentionally return 1000s of lines of > data. > >> Is there a better method I should be using here? I would have to call >> $pop3->delete() to delete each message as I cycle through them. is >> there an attribute I can use such as "true" that I can add to >> fetchFromOffset() to delete messages as I cycle through it. > > Yes, it's the 3rd argument to that method: > http://ezcomponents.org/docs/api/trunk/Mail/ezcMailPop3Transport.html#fetchFromOffset > > regards, > Derick > > PS: Could you please not use "reply" when starting a new topic. Always > use the compose functionality to avoid hijacking threads. Now it shows > in in threaded clients in a totally wrong place (as you can see at > http://thread.gmane.org/gmane.comp.web.ezcomponents.devel/3891) > > -- > Derick Rethans > eZ components Product Manager > eZ systems | http://ez.no
Derick, thank you for the reply. my appologies for sending it to the wrong thread. I assumed deleting the subject and body would start a new one. won't happen again. Thank you for the information. I had searched the documentation for fetchFromOffset but no results appeared. I may have done something wrong. sorry. I will most certainly use this method. Thanks for your help! Dave -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components