2008年12月7日星期日

[fw-core] Zend_Mime_Message::createFromMessage

Hello,

I'm trying to fetch emails using pop3 protocol and then extract
attachments from them.

$mail = new Zend_Mail_Storage_Pop3(array(...));

foreach ($mail as $m) {
$ct = Zend_Mime_Decode::splitHeaderField($m->getHeader('Content-Type'));

$mime = Zend_Mime_Message::createFromMessage($m, $ct['boundary']);

$p = $mime->getPartContent(1);
}

I'm not sure if everything is called correctly but i get following result:

Warning: base64_encode() expects parameter 1 to be string, array given
in /home/kabot/www/flyemtel/includes/external/Zend/Mime.php on line 174

It looks like attachment encoded in base64 is forced to second encoding.
What do you think about this, is it error in Zend_Mime or am i doing
something wrong?


regards
--
Piotr Kabacinski

没有评论: