Re: note 9591 added to imap_check
| From: | igor at linuxinside dot com | Date: | Tue, 14 Nov 2000 07:56:59 +0000 |
| Subject: | Re: note 9591 added to imap_check | ||
| References: | 1 2 3 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-7666@lists.php.net to get a copy of this message | ||
Hm... i guess that i should of bad mouth the imap_check() then....
what i was trying to do is to show a new message count
as long as there are unseen messages in the mailbox.....
as i can see you are pretty good with imap functions....
can you tell me which function does imap_sort use to get the
headers ?
i am actually extracting needed into from the imap_fetch_overview()
i know that this is not a really good way, but that works for me
and once again, this is my first project and i've never programmed before
so i am doing my best....
igor
Hartmut Holzgraefe wrote:
> Hartmut Holzgraefe wrote:
> > as 'recent' is defined as
> > "arrived in the mailbox since the previous time the mailbox was opened",
> > you don't have to blame imap_check() but imap_open() instead
> >
> > i assume what you are really looking for is the unseen property returned
> > by imap_status() ... ?
>
> oh, and by the way:
>
> imap_status() will return the 'recent' count for a mailbox too,
> and if you pass it only the SA_RECENT flag it should not even
> reset this value as it does not have to open the mailbox for
> this operation
>
> but if you add the SA_USEEN flag it might have to open the mailbox
> (this is implementation dependant) thus resetting the recent
> counter once again
>
> so if you really just want to get the recent count, you should do a
>
> <?php
>
>
> $mail_connection=imap_open("{server}INBOX","user","password",OP_HALFOPEN);
> $res = imap_status($mail_connection,"{server}mailbox",SA_RECENT);
> echo "Recent: ".$res->recent;
> imap_close($mail_connection);
> ?>
> --
> Harmut Holzgraefe hartmut@six.de