Skip to content

Commit

Permalink
\imap_header dosen't work with UID
Browse files Browse the repository at this point in the history
http://us1.php.net/manual/en/function.imap-header.php
http://us1.php.net/manual/en/function.imap-headerinfo.php

 msg_number
    The message number

http://us1.php.net/manual/en/function.imap-msgno.php
imap_msgno — Gets the message sequence number for the given UID

I don't know why PHP dosen't has a way to read the header with the UID but this is the solution.
  • Loading branch information
ysramirez committed Aug 11, 2014
1 parent 14be6ee commit 6dd4cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ddeboer/Imap/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function getHeaders()
// \imap_header is much faster than \imap_fetchheader
// \imap_header returns only a subset of all mail headers,
// but it does include the message flags.
$headers = \imap_header($this->stream, $this->messageNumber);
$headers = \imap_header($this->stream, \imap_msgno($this->stream, $this->messageNumber));
$this->headers = new Message\Headers($headers);
}

Expand Down

0 comments on commit 6dd4cb2

Please sign in to comment.