[PEAR-BUG] Bug #19994 [Com]: imap_fetchoverview

[email protected] ("kaspis") Thu, 27 Nov 2014 15:36:06 +0000 (GMT)
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=19994&edit=1

 ID:               19994
 Comment by:       kaspis
 Reported By:      kasparas dot ziuraitis at gmail dot com
 Summary:          imap_fetchoverview
 Status:           Open
 Type:             Bug
 Package:          Net_IMAP
 Operating System: windows 7
 Package Version:  Unknown
 PHP Version:      5.5.0
 New Comment:

I have exactly the same problem. Was running the email reading script
for two years, now I have moved to a new server and the stdclass dont
return message ID anymore. 

Any solutions?


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

[2013-06-26 07:52:23] abhi_dixit

Description:
------------
when i call imap_fetch_overview iam not getting the value for 
message id for all the emails read using imap_fetch_overview,i 
had tried this using imap_headers(), imap_headerinfo(), but 
failed to get the value of message id

Test script:
---------------
imap_fetchoverview returns all the header fields but for message id
there is no 
value, below is the code i am using-:
<?php 

$m_username="[email protected]";
$m_password="xxxxx";

$mbox=imap_open('{imap.gmail.com:993/imap/ssl}[Gmail]/Spam',
$m_username, 
$m_password);
$MC = imap_check($mbox);

// Fetch an overview for all messages in SPAM
$overview = imap_fetch_overview($mbox,"1:{$MC->Nmsgs}",0);
echo '<pre>';
print_r($overview);
exit;
?>
below is it's output-:
Array
(
    [0] => stdClass Object
        (
            [subject] => hello test
            [from] => ABCD 
            [to] => [email protected]
            [date] => Mon, 24 Jun 2013 15:01:07 +0100
            [message_id] => 
            [size] => 1821
            [uid] => 2814
            [msgno] => 1
            [recent] => 0
            [flagged] => 0
            [answered] => 0
            [deleted] => 0
            [seen] => 0
            [draft] => 0
            [udate] => 1372082473
        )

    [1] => stdClass Object
        (
            [subject] => hello test
            [from] => ABCD 
            [to] => [email protected]
            [date] => Mon, 24 Jun 2013 15:10:03 +0100
            [message_id] => 
            [size] => 20823
            [uid] => 2815
            [msgno] => 2
            [recent] => 0
            [flagged] => 0
            [answered] => 0
            [deleted] => 0
            [seen] => 0
            [draft] => 0
            [udate] => 1372083053
---
for some other email id this code returns message id but not for all
emails out 
of 77emails message id is returned for 20


Expected result:
----------------
i want that when i call imap_fetch_overview i should get the value   
of message id for the emails -:
[message_id] => 
<51c2cbad.063ae50a.0405.ffff9ce0SMTPIN_ADDED_MISSING@m
x.google.com>

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


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