Zend Framework - POP3 - retrieving message source

Posted by pako on Stack Overflow See other posts from Stack Overflow or by pako
Published on 2010-04-08T17:09:52Z Indexed on 2010/04/08 17:13 UTC
Read the original article Hit count: 376

Filed under:
|
|
|
|

Is it possible to retrieve the complete message source (similar tu Unix Mbox format) using Zend_Mail_Storage_Pop3 from the Zend Framework?

I'm using the following code to retrieve messages:

  $mail = new Zend_Mail_Storage_Pop3(array('host'     => 'localhost',
                                           'user'     => 'test',
                                           'password' => 'test'));
  echo $mail->countMessages() . " messages found\n";
  foreach ($mail as $message) {
      echo "Mail from '{$message->from}': {$message->subject}\n";
  }

It looks like the $mail object contains the message already split up into fields (ie. headers, contents, etc.). Is there any way to retrieve the original message source? I would like to be able to store it so if I need to parse the message again using a different tool, I will have the necessary information.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about php