Req #37396 [Opn->Fbk]: Feature request for imap_fetchstructure
| From: | cmb@php.net | Date: | Fri, 16 Oct 2020 14:51:00 +0000 |
| Subject: | Req #37396 [Opn->Fbk]: Feature request for imap_fetchstructure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229669@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=37396&edit=1
ID: 37396
Updated by: cmb@php.net
Reported by: lacak at users dot sourceforge dot net
Summary: Feature request for imap_fetchstructure
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: IMAP related
Operating System: Windows
PHP Version: 5.1.4
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Maybe I misunderstand your request, but it doesn't look hard to
add the part numbers yourself:
<?php
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);
add_part_numbers($structure);
?>
Previous Comments:
------------------------------------------------------------------------
[2006-05-10 11:47:57] lacak at users dot sourceforge dot net
Description:
------------
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.
Thanks
-Laco
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=37396&edit=1