6.0.0-git
2024-03-19
Last Modified 2013-09-04 by Jan Schneider

Moving sent-mail folders out of special folders area

Known to work with Horde 4/IMP 5

If you have a lot of identities with different sent mailboxes, IMP's left panel might not be as convenient as it's been designed for.

This quick hack will move sent folders into the tree in the lower part of the panel.

Search for this method in your horde/imp/lib/Mailbox.php

    /**
     */
    public function __get($key)
    {
        global $injector;

Inside that method, search for this snippet of code :

        case 'special':
            $special = $this->getSpecialMailboxes();

            switch ($this->_mbox) {
            case $special[self::SPECIAL_COMPOSETEMPLATES]:
            case $special[self::SPECIAL_DRAFTS]:
            case $special[self::SPECIAL_SPAM]:
            case $special[self::SPECIAL_TRASH]:
                return true;
            }

            return in_array($this->_mbox, array_merge(
                $special[self::SPECIAL_SENT],
                $special[self::SPECIAL_USERHOOK]
            ));

Simply comment the line about SPECIAL_SENT like this :

        case 'special':
            $special = $this->getSpecialMailboxes();

            switch ($this->_mbox) {
            case $special[self::SPECIAL_COMPOSETEMPLATES]:
            case $special[self::SPECIAL_DRAFTS]:
            case $special[self::SPECIAL_SPAM]:
            case $special[self::SPECIAL_TRASH]:
                return true;
            }

            return in_array($this->_mbox, array_merge(
//              $special[self::SPECIAL_SENT],
                $special[self::SPECIAL_USERHOOK]
            ));

And voilĂ  !