|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-10 11:47 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
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); ?>