Ok, here it goes
When I began developing in PHP a call to the imap_fetchstructure function on
an email with attachments created a 'parts' array that was indexed
numerically. Meaning I could say:
if (count($message->parts) > 0)
for ($x = 0; $x < count($message_parts); $x++)
// do some processing
Then I upgraded PHP. I'm not sure which upgrade changed it's workings but
it definately changed by 4.3.4.
Now, from what I understand the parts array is indexed with things like 0,
0.1, 0.1.1, 0.2. Worse yet, the count($message->parts) call doesn't even
seem to return accurate information. In particular it behaves as though a
parts array exists on messages without attachments.
Enough background, is this new code "broken" or is this the way it should
have behaved the whole time?
If it is not-broken or has not been fixed:
1. How can I get an accurate count of the parts array, determine if
attachments are present, and determine what the valid array indexes are?
2. Do you know of any email classes/applications that work with these
changes?
TIA,
Daryl Meese
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php