ID:               45470
 User updated by:  kevin at icscomp dot com
 Reported By:      kevin at icscomp dot com
 Status:           Bogus
 Bug Type:         IMAP related
 Operating System: Windows 2003 Server
 PHP Version:      5.2.6
 New Comment:

Okay, well if the PHP component to check unread messages doesn't work
on Exchange, is their an alternate PHP solution for doing this?


Previous Comments:
------------------------------------------------------------------------

[2008-07-11 15:09:37] [EMAIL PROTECTED]

It's just that Exhange + IMAP == not very good idea. It's not any PHP
bug anyway, we just wrap around the UW Imap c-client lib, so you should
complain to the author of it. But consider yourself warned: He'll say
about same what I said above. :)

------------------------------------------------------------------------

[2008-07-10 13:22:22] kevin at icscomp dot com

I have tried using this as well:

imap_open("{mailserver:993/imap/ssl}/INBOX",
"domain/user","password",
OP_READONLY, 1) or die("can't connect: ".imap_last_error());
$imap_obj = imap_status($mbox, "{mail:993/imap/ssl}/INBOX",
SA_UNSEEN);
var_dump($imap_obj);


Same result.  Any ideas?

------------------------------------------------------------------------

[2008-07-10 08:18:38] [EMAIL PROTECTED]

Shouldn't you be using same server name in both imap_open() and
imap_status() ??

------------------------------------------------------------------------

[2008-07-09 20:50:56] kevin at icscomp dot com

Description:
------------
When I run the PHP commands to try to retrieve the unread messages
using
the imap_status command, I am finding that no data is being returned. 
Additionally, the data that is being returned is random numbers each
time I push the refresh button.  I would really like to see this issue
be fixed.  Thanks.

My code is below:


Here is the output


Help!


Reproduce code:
---------------
$mbox = imap_open("{mailserver:993/imap/ssl}",
"domain/user","password",
OP_READONLY, 1) or die("can't connect: ".imap_last_error());
$imap_obj = imap_status($mbox, "{mail:993/imap/ssl}/INBOX",
SA_UNSEEN);
var_dump($imap_obj);


Expected result:
----------------
I assume something like:

object(stdClass)#19 (1) { ["Unread"]=> int(5) } 



Actual result:
--------------
Output 1:
object(stdClass)#19 (1) { ["flags"]=> int(0) } 

Output 2:
object(stdClass)#19 (2) { ["flags"]=> int(26571976) ["uidnext"]=>
int(26649488) }

back and forth .... no other data is listed.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45470&edit=1

Reply via email to