|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #37396 Feature request for imap_fetchstructure
Submitted: 2006-05-10 11:47 UTC Modified: 2020-10-16 14:51 UTC
From: lacak at users dot sourceforge dot net Assigned: cmb (profile)
Status: Feedback Package: IMAP related
PHP Version: 5.1.4 OS: Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-05-10 11:47 UTC] lacak at users dot sourceforge dot net
It would be nice if function imap_fetchstructure() will be able to return object extended by "part_number", which may be used as paramater in imap_fetchbody().

So I can walk throught structure of mail message using imap_fetchstructure() and obtain data by single call imap_fetchbody().

Today I must relatively complicate build part_number.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-21 21:26 UTC]
-Package: Feature/Change Request +Package: IMAP related
 [2020-10-16 14:51 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-16 14:51 UTC]
Maybe I misunderstand your request, but it doesn't look hard to
add the part numbers yourself:

function add_part_numbers($structure, $acc = '') {
    if (isset ($structure->parts)) {
        foreach ($structure->parts as $i => $part) {
            $part_number = $acc . ($i + 1);
            $part->part_number = $part_number;
            add_part_numbers($part, "$part_number.");

$structure = imap_fetchstructure($imap, 1);
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 21 22:01:23 2020 UTC