note 44498 added to function.imap-headerinfo

From: Date: Sun, 08 Aug 2004 02:40:49 +0000
Subject: note 44498 added to function.imap-headerinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-74187@lists.php.net to get a copy of this message
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? ---- Manual Page -- http://www.php.net/manual/en/function.imap-headerinfo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44498 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44498&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44498&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74187) next »