Searches structure defined in Mail_IMAP::_declareParts and depending on the method calling on it, Mail_IMAP::_scanMultipart is used to build arrays of inline parts and attachments, and is also used to select the correct message part to display.
Warning: As a method used internally by Mail_IMAP, Mail_IMAP::_getParts should not be used directly. Its API has the potential of being changed in future releases, should I find a more efficient approach.
| param | int | &$mid message id |
| param | str | &$pid part id. |
| param | int | $i Indice key for the part id being passed. |
| param | int | $MIME The default MIME type to retrieve, one of text/plain|text/html. |
| param | int | $action (optional) One of get|add. Toggles whether the method is building inline and attachment parts array, or is searching for the proper message body to display. |
| param | int | $look_for (optional) One of all|none|multipart|top. Toggles how the method searches through the message structure. 'all', means that the part id passed is a message/rfc822 part (an attached message) and triggers an algorithm tailored to the anomolies of that MIME type, threading is turned on and only attachments relevant to that part are retrieved. 'none' means threading has been deactivated by the $args['retrieve_all'] argument of Mail_IMAP::getParts it triggers the method to look for nothing in particular, just to build inline and attachment part arrays. 'multipart' is used only by Mail_IMAP::getBody and it tells Mail_IMAP::_scanMultipart that the part id being passed is a message/rfc822 (attached message) or is a multipart/alternative message part and triggers an algorithm that searches for the correct message body to return. 'top' indicates that the part id being passed is a top-level part and is only used by Mail_IMAP::getParts, this indicates that threading is activated and the method should only look for top-level inline parts and attachments. |
| param | int | $pid_add (optional) One of 1|2. This argumnet is used to fine tune what level of nesting within a message the method should look to find the respective attachments, inline parts or message body. |
| param | bool | $get_alternative (optional) Toggles whether the alternative part of a multipart message should be returned in the inline part array. |
| return | string|FALSE | |
| access | private | |
* All comments are moderated and are subject to approval.
Your comment will appear once it has been approved.
Posting multiple times will not expedite the approval process.