Searches structure defined in Mail_IMAP::_declareParts for the top-level default message part id. Attempts to find a text/html part by default, if no text/html part is found, automatically attempts to find a text/plain part next. This may be reversed to find a text/plain part by default and a text/html part if a text/plain part could not be found by specifying the default MIME type in the $get_mime argument, which is passed to Mail_IMAP::_getDefaultPid automatically via calling on the Mail_IMAP::getParts method or the Mail_IMAP::getBody, which calls on Mail_IMAP::_getDefaultPid internally via the Mail_IMAP::_checkIfParsed method. Set the respective $get_mime arguments in Mail_IMAP::getParts and Mail_IMAP::getBody to get a text/plain part by default instead of a text/html part.
If no text/plain or text/html part can be found in a message, Mail_IMAP always defaults to '1' as being the default part.
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 | $get_mime (optional) default MIME type to look for (one of text/plain or text/html, text/html by default) |
| param | int | $attempt (optional) Mail_IMAP::_getDefaultPid calls on itself recursively, if the preferred default part MIME type specified in $get_mime is not found. This argument is used to track its attempt at finding the default part. |
| return | string | Default top level message part id. |
| access | private | |