Finally got this working.  Thanks to all the people who told me it 
couldn't be doneand why, I had enough information to get it 
working.   I am now able to create folders which can contain 
subfolders on redhat linux.

First you have to switch to the right imap server.  The Univeristy of 
washington is the default for redhat.

Second you have to turn on Show 'Contain Sub.' Option

This will allow you to create folders that have subfolders.   You can 
also use these folders.  You will not be able to delete them.  The 
following code change will allow you to delete sub folders which 
contain no folders.

make the marked changes in src/folders.php   Please note that this 
may break otehr imap servers so this may need to be changed to 
test for the washington imap server before making these changes 
general

    echo "<FORM ACTION=\"folders_delete.php\" 
METHOD=\"POST\">\n"
       . "<TT><SELECT NAME=mailbox>\n"
       . '         <OPTION VALUE="">[ ' . _("Select a folder") . " 
]</OPTION>\n"
;
    for ($i = 0; $i < count($boxes); $i++) {
        $use_folder = true;
        if ((strtolower($boxes[$i]['unformatted']) != 'inbox') &&
            ($boxes[$i]['unformatted'] != $trash_folder) &&
            ($boxes[$i]['unformatted'] != $sent_folder) &&
            ($boxes[$i]['unformatted'] != $draft_folder) &&
                        /*   changes by rts for sub folder support */
                        (
                        /*   if not a sub dir list it */
            ((!in_array('noselect', $boxes[$i]['flags']))) ||
                                (
                                /* if it is a sub dir with no sub files list it 
*/
                                /* we know at this point it is a sub dir */
                                /* if no more files then it is empty */
                                ($i == count($boxes)) ||
                                /* see if the next file is a sub of this one */
                                (
                                        substr($boxes[$i+1]['unformatted-dm'],0,
                                                        strlen($boxes[$i]['unfor
matted-dm'])
                                                )
                                        !=
                                        $boxes[$i]['unformatted-dm']
                                )
                                )
                        ) 
                        /* end rts changes */
                                        &&  
            ((strtolower($imap_server_type) != 'courier') ||
             (strtolower($boxes[$i]['unformatted']) != 'inbox.trash'))) {
            $box = $boxes[$i]['unformatted-dm'];
            $box2 = str_replace(' ','&nbsp;',imap_utf7_decode_local(
                $boxes[$i]['unformatted-disp']));
            Echo "         <OPTION VALUE=\"$box\">$box2</option>\n";
        }
    }
    echo "</SELECT></TT>\n";
    echo "<INPUT TYPE=SUBMIT VALUE=\"";
    echo _("Delete");
    echo "\">\n";
    echo "</FORM></TD></TR>\n";

--------------------------------------------------------------------
--------------
Ray Todd Stevens     Specialists in Network and Security 
Consulting
Senior Consultant    Software audit service available
Stevens Services
Suite 21
3754 Old State Rd 37 N
Bedford, IN 47421
(812) 279-9394
[EMAIL PROTECTED]

Thought for the day:
    Communist (n): one who has given up all hope
    of becoming a Capitalist.


For PGP public key send message with subject 
please send PGP key

If this message refers to an attachment the attachment
may arrive as a seperate mail message depending on the
type of mail client and gateway software you are using.



-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to