I've had a couple of users complain about not being able to delete messages.
The cause turns out to be that they don't have a Trash folder.
The attached diff/patch avoids this by creating the Trash folder if it doesn't
exist before moving a message into it.
The only problem is that even though the Trash folder is created, it doesn't
show up in the folders list until the whole folders list is refreshed.
--
Jacob Brunson
Department of Chemistry, BYU
Index: program/include/rcube_imap.inc
===================================================================
RCS file: /cvsroot/roundcubemail/roundcubemail/program/include/rcube_imap.inc,v
retrieving revision 1.28
diff -u -r1.28 rcube_imap.inc
--- program/include/rcube_imap.inc 5 Feb 2006 16:14:17 -0000 1.28
+++ program/include/rcube_imap.inc 13 Feb 2006 21:10:03 -0000
@@ -885,10 +885,13 @@
$to_mbox = $this->_mod_mailbox($to_mbox);
$from_mbox = $from_mbox ? $this->_mod_mailbox($from_mbox) : $this->mailbox;
- // make shure mailbox exists
+ // make sure mailbox exists
if (!in_array($to_mbox, $this->_list_mailboxes()))
- return FALSE;
-
+ if (in_array(strtolower($to_mbox), $this->default_folders))
+ $this->create_mailbox($to_mbox, TRUE);
+ else
+ return FALSE;
+
// convert the list of uids to array
$a_uids = is_string($uids) ? explode(',', $uids) : (is_array($uids) ? $uids : NULL);