2008年9月23日星期二

[fw-mvc] Zend_Mail_Storage_Imap

Hello,


I'm using the Zend_Mail (ZF 1.6.0) component to retrieve messages from an imap server and I have the following question:

When I access my inbox, I fetch my received messages just the way as it is explained in the documentation:

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

foreach ($mail as $message) {
      $headers = $message->getHeaders();

      if ($message->hasFlag(Zend_Mail_Storage::FLAG_RECENT)) {
            echo '! ';
      }

      echo $header['from'] . $header['date'] . $header['subject'];
}

So far, so good. This is my inbox and there I just want to list the headers. To read the message, I click on the message and there I can see the whole content of the message.
The problem is that when I refresh my inbox, all my recent messages are not recent anymore because in the first time I listed it, it was set as read.
Is there anyway to list my messages in the inbox without setting it as read?
I just want to set as read after clicking on the message.
Thanks in advance!


Best regards,

/**
 * Ramses Paiva
 * Software Consultant
 *
 * SourceBits Technologies
 * 63, 19th Main
 * Rajajinagar 2nd Block

 * Bangalore, KA, India
 *
 * Ph  +91 80 4127 7434
 * Mob +91 97 4237 6432

 * Fax +91 80 2342 5494
 * www.sourcebits.com
  */

没有评论: