Issue Type: Improvement Created: 2009-12-10T03:00:09.000+0000 Last Updated: 2012-11-20T21:38:04.000+0000 Status: Open Fix version(s): Reporter: Michael Kliewe (mkliewe) Assignee: None Tags: - Zend_Mail_Storage
Related issues: - ZF-8488
Attachments: - copy.patch.txt
If I want to copy 1000 messages, I have to call the copyMessage() method in Zend_Mail_Storage_Imap 1000 times. This is really slow. The same applies to moveMessage().
Both methods internally use the copy() method of Zend_Mail_Protocol_Imap. This method supports a single id or a range of ids, but this is not used. So it would be nice if copy() would support an array of ids (which is then joined to a comma-separated string), because this is supported by IMAP.
This functionality is already supported by fetch(), and I provided a patch for store() in ZF-8488 . I will attach a patch for the copy() method (which is the same as in fetch() or store()).
Then it is easy to create a function in Zend_Mail_Storage_Imap which supports copying or moving of many messages with one IMAP command, which is very fast then.
The $from ist also missing in phpDoc comment for copy() method.
Posted by Satoru Yoshida (satoruyoshida) on 2009-12-10T06:15:29.000+0000
Have you found an issue?
See the Overview section for more details.