public function getPartDecodedContent(Zend_Mime_Part $mimePart)
    {
        // getRawContent is not available in Zend 1.11 (Magento CE 1.7)
        if (method_exists($mimePart, 'getRawContent')) {
            return $mimePart->getRawContent();
        }

        $content = '';
        if (method_exists($mimePart, 'getContent')) {
            $encoding = $mimePart->encoding;
            $mimePart->encoding = 'none';
            $content = $mimePart->getContent();
            $mimePart->encoding = $encoding;
        }

        return $content;
    }