php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43659 imap_headerinfo fail to return mail header
Submitted: 2007-12-22 16:34 UTC Modified: 2008-01-28 23:59 UTC
From: mcheung63 at hotmail dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5.2.5 OS: windows xp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mcheung63 at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-12-22 16:34 UTC] mcheung63 at hotmail dot com
Description:
------------
Hi all, i am running php 5.2.5 with apache 2.2 in windows xp, i am try to retrieve email headers from dovecot-1.0.7-2.fc8 runing on fedora core 8. If the email subject have unicode character, imap_headerinfo() will return FALSE.

If i use imap_fetch_overview() to retrieve email headers, everything fine.
thanks
from Peter (mcheung63@hotmail.com)

Reproduce code:
---------------
function getHeaderList($serverAddress, $port, $ssl, $username, $password, $inbox, $startRowNumber, $endRowNumber){
    if ($ssl){
        $mbox = imap_open("{".$serverAddress.":".$port."/ssl/novalidate-cert}".$inbox, $username, $password);
    }else{
        $mbox = imap_open("{".$serverAddress.":".$port."/novalidate-cert}".$inbox, $username, $password);
    }
    $sorted_headers=@imap_sort($mbox,SORTDATE,1,SE_UID);
    $returnArray=Array();
    $x=0;
    while (list(,$qq) = each($sorted_headers)) {
        $returnArray[$x++]=imap_headerinfo($mbox, $qq); 
    }
    imap_close($mbox);
    return $returnArray;
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-23 07:58 UTC] mcheung63 at hotmail dot com
After i change @imap_sort($mbox,SORTDATE,1,SE_UID) to @imap_sort($mbox,SORTDATE,1) , everything work fine, sorry about the mistake
 [2008-01-28 23:59 UTC] tony2001@php.net
Please report IMAP c-client bugs to its developers.
Thank you.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 19:01:31 2025 UTC