Imap functions (imap_fetchstructure)

From: Date: Fri, 26 Mar 2004 08:04:44 +0000
Subject: Imap functions (imap_fetchstructure)
Groups: php.general 
Request: Send a blank email to php-general+get-181543@lists.php.net to get a copy of this message
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

« previous php.general (#181543) next »