PHP Classes

Problem with get_top();

Recommend this page to a friend!  >  All threads  >  Problem with get_top();  >  (Un) Subscribe thread alerts  
Subject:Problem with get_top();
Summary:for, while, php...
Author:Szymon Olechowski
Date:2006-09-04 08:56:50
Update:2006-09-05 09:33:33


  1. Problem with get_top();   Reply   Report abuse  
Picture of Szymon Olechowski Szymon Olechowski - 2006-09-04 08:56:50

I want to use the script for checking for special subjected mails. If it has special subject the program will read it and if it does not, it will mark it to be deleted. I have a problem, because if i want to list first lines (f.e. 10) of a mail i only get the first mail (yes, there are two mails).

Here is the php code:


for ($i=1; $i<=$msg_list['count_mails']; $i++)



print 'Message no. '.$k.'<br><br>';


while (isset($message_top[$m]))

// printing here just for checking

print htmlentities($message_top[$j]);




i only get print to Message no. 2 and then nothing :(

  2. Re: Problem with get_top();   Reply   Report abuse  
Picture of Steffen Stollfuß Steffen Stollfuß - 2006-09-05 09:33:33 - In reply to message 1 from Szymon Olechowski

please run the script with the debug and logging function. I have check the get_top() function but can't find any problems.

Please make sure that you get the UID list (uidl), so that we can see where your pop3 server starts to count the messages.

My other opinion is that you should change the for loop from msg_number = 1 to 0.