note 44498 rejected from function.imap-headerinfo by nlopess

From: Date: Sun, 08 Aug 2004 02:42:57 +0000
Subject: note 44498 rejected from function.imap-headerinfo by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74188@lists.php.net to get a copy of this message
Note Submitter: info@mad-mare.com ---- i see that this command marks the mail as read, for example i've done this exactly and only this, nothing else is in the script:- <?php $mbox = imap_open("{pop3.server:110/pop3}INBOX","my-user","mypass") or die("can't connect: ".imap_last_error()); echo $mbox."<BR>"; print_r(imap_fetch_overview($mbox,"1",0)); $headers = imap_sort($mbox,SORTDATE,1); echo "<br>"; print_r($headers); $nrofmsgs = count($headers); $i = 0; if ($nrofmsgs == 1) { ?> <h1>You Have No Emails</h1> <?php } else { ?> <table border=1> <?php while ($i < $nrofmsgs) { $msg = imap_headerinfo($mbox, $headers[$i]); $from = $msg -> from; $subject = $msg -> subject; $maildate = $msg -> date; $mailsize = $msg -> Size; $sizething = Bytes; $flags = $msg -> Unseen."-".$msg -> Recent; if ($mailsize >= 1024) { $mailsize = round($mailsize/1024); $sizething = KB; } echo "<tr><td>".$headers[$i]."</td>"; echo "<td>".$from['0'] -> personal." &lt;".$from['0'] -> mailbox."@".$from['0'] -> host."&gt;</td>"; echo "<td>".$subject."</td>"; echo "<td>".$maildate."</td>"; echo "<td>".$mailsize." ".$sizething"</td>"; echo "<td>".$flags."</td></tr>"; $i = $i + 1; } ?> </table> <?php print_r(imap_headerinfo($mbox, 16)); } imap_close($mbox); ?> i send myself an email and after that i run the script, and see that the mail i sent my self is read, i send another email and check it by another pre-written script and find that its unread and the 1st one i sent is read... how comes?? is there anything wrong in the script?

« previous php.notes (#74188) next »