[PHP] Re:[PHP] imap_search and results
Hello: Here is my code : /---/ $mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID); echo sizeof($mails); /--/ You can start to parse the mailheader,mailbody... for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Hi, nice to meet you! -- ¡»From: [EMAIL PROTECTED] http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_search and results
On Thu, 26 Aug 2004 22:25:00 +0800, fongming [EMAIL PROTECTED] wrote: Hello: Here is my code : /---/ $mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID); echo sizeof($mails); /--/ You can start to parse the mailheader,mailbody... for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Hi, nice to meet you! -- ¡»From: [EMAIL PROTECTED] http://fonn.fongming.idv.tw [EMAIL PROTECTED] Thank you, I have finally found what is the thing which was the problem, it was the option SE_UID in the search function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re:[PHP] imap_search and results
On Thu, 2004-08-26 at 09:25, fongming wrote: for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Calling count() every time the for loop iterates is inefficient. $count = count($mails); for($i=0; $i$count; $i++){ } -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_search and results
Hello, I'm trying to make a small script to show mails on a imap server with a criteria. Here is my code : /---/ $mails = imap_search($mbox, 'TO [EMAIL PROTECTED]',SE_UID); echo sizeof($mails); /--/ The connection to the server is the working, the search also, the size returned is not equal to 0. But now I don't know how to retrieve the number of the messages in the array. How can I do that ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php