Doc #65126 [Opn->Nab]: imap_fetchoverview returns all the header fields but for message id

From: Date: Fri, 16 Oct 2020 13:55:53 +0000
Subject: Doc #65126 [Opn->Nab]: 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-18004@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 Updated by: cmb@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 +Status: Not a bug Type: Documentation Problem Package: IMAP related Operating System: windows 7 PHP Version: 5.5.0 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > It is because the browser is thinking of it as a tag, due to its > syntax. That. Previous Comments: ------------------------------------------------------------------------ [2016-09-06 09:23:22] akhil dot gupta7295 at gmail dot com It is because the browser is thinking of it as a tag, due to its syntax. To display it in the browser, use this instead, echo htmlentities(print_r($overview, true)); ------------------------------------------------------------------------ [2013-06-25 23:01:44] mattficken@php.net 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. ------------------------------------------------------------------------ [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

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