Doc #65126 [Com]: imap_fetchoverview returns all the header fields but for message id

From: Date: Tue, 25 Jun 2013 23:01:44 +0000
Subject: Doc #65126 [Com]: imap_fetchoverview returns all the header fields but for message id
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10009@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65126&edit=1

 ID:                 65126
 Comment by:         mattficken@php.net
 Reported by:        abhinav dot octane at gmail dot com
 Summary:            imap_fetchoverview returns all the header fields but
                     for message id
 Status:             Open
 Type:               Documentation Problem
 Package:            IMAP related
 Operating System:   windows 7
 PHP Version:        5.5.0
 Block user comment: N
 Private report:     N

 New Comment:

You should try the Net_IMAP pear package: http://pear.php.net/package/Net_IMAP

Its a pure PHP implementation, not to be confused with Mail_Imap/the 'imap' extension.


Previous Comments:
------------------------------------------------------------------------
[2013-06-25 18:46:04] abhinav dot octane at gmail dot com

any help will be highly appreciated.

------------------------------------------------------------------------
[2013-06-25 18:38:42] abhinav dot octane at gmail dot com

Description:
------------
---
From manual page: http://www.php.net/function.imap-fetch-overview#refsect1-
function.imap-fetch-overview-returnvalues

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="example@gmail.com";
$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] => example@gmail.com
            [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] => example@gmail.com
            [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 77 message id is returned for 20



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



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


Thread (5 messages)

« previous php.doc.bugs (#10009) next »