protected function _getAndDecodeMessageBody(Felamimail_Model_Message $_message, $_partId, $_contentType, $_account = NULL)
{
$structure = $_message->getPartStructure($_partId);
- $bodyParts = $_message->getBodyParts($structure, $_contentType);
+ if (empty($structure)) {
+ if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
+ . ' Empty structure, could not find body parts of message ' . $_message->subject);
+ return '';
+ }
+ $bodyParts = $_message->getBodyParts($structure, $_contentType);
if (empty($bodyParts)) {
+ if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
+ . ' Could not find body parts of message ' . $_message->subject);
return '';
}