|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61178 More info needed on "$section" parameter.
Submitted: 2012-02-24 13:42 UTC Modified: 2015-06-15 11:59 UTC
From: ww dot galen at gmail dot com Assigned:
Status: Open Package: IMAP related
PHP Version: Irrelevant OS: n/a
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: ww dot galen at gmail dot com
New email:
PHP Version: OS:


 [2012-02-24 13:42 UTC] ww dot galen at gmail dot com
From manual page:

The description of the "$section" parameter to imap_fetchbody is woefully inadequate. At the very least, it could use links to the 
relevant parts of the IMAP standard it refers to, which (as far as I can determine) are § 6.4.5 "FETCH Command"  
( and the definition of fetch-att in § 9 "Formal Syntax" 
( on page 85 (

A note such as the following would be helpful (though it should be checked for accuracy):

"Since PHP array indices are 0-based while section numbers are 1-based, you must add 1 to the index of any section taken from the result 
of imap_fetchstructure before using it with imap_fetchbody. For example, if $parts is the result of imap_fetchstructure, $parts[0] would 
correspond to section number "1", and $parts[2][1][0] corresponds to "3.2.1"."


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-15 11:59 UTC]
-Package: Documentation problem +Package: IMAP related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC