[nycphp-talk] manipulating an IMAP account
John Campbell
jcampbell1 at gmail.com
Fri Oct 2 12:04:25 EDT 2009
On Fri, Oct 2, 2009 at 11:21 AM, David Mintz <david at davidmintz.org> wrote:
> If you were working on a Zend Framework application, and if you were writing
> a simple script to log into an IMAP email account, fetch messages, iterate
> through them finding ones matching particular criteria, do something with
> the information in each of those messages, delete the message, and call it a
> day... And if you found that Zend_Mail_Storage_Imap has a flawed
> implementation of removeMessage(), because it sends an EXPUNGE command on
> every invocation and thereby screws up the class' ArrayAccess
> implementation by disrupting the mapping between message numbers and
> messages... then what would you do?
So, let me make sure I understand this correctly. Expunge, iirc,
deletes everything marked for deletion, and ZEND calls expunge
immediately after you mark something for deletion, which is not quite
right (but, makes imap behave more like pop). It is unlikely the
class maintainers are going to change that.
How is the ArrayAccess broken? The key=>message mapping should change
every time you call delete.
Regards,
John Campbell
More information about the talk
mailing list