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
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to