Added address editing and removal methods.
[squirrelmail.git] / functions / imap_general.php
index a8cde1dd08a4ee44346a5985dcb2fb4b014bd49a..7adb2258cf888616cf75d2491841632750b19b4f 100755 (executable)
     **  Returns the delimeter between mailboxes:  INBOX/Test, or INBOX.Test... 
     ******************************************************************************/
    function sqimap_get_delimiter ($imap_stream) {
-      fputs ($imap_stream, ". LIST \"\" *\r\n");
+      fputs ($imap_stream, ". LSUB \"\" *\r\n");
       $read = sqimap_read_data($imap_stream, ".", true, $a, $b);
       $quote_position = strpos ($read[0], "\"");
       $delim = substr ($read[0], $quote_position+1, 1);
     **  Saves a message to a given folder -- used for saving sent messages
     ******************************************************************************/
    function sqimap_append ($imap_stream, $sent_folder, $length) {
-      fputs ($imap_stream, "a001 APPEND $sent_folder (\\Seen) \{$length}\n");
+      fputs ($imap_stream, "a001 APPEND \"$sent_folder\" (\\Seen) \{$length}\r\n");
       $tmp = fgets ($imap_stream, 1024);
    } 
 
    function sqimap_append_done ($imap_stream) {
       fputs ($imap_stream, "\r\n");
+      $tmp = fgets ($imap_stream, 1024);
    }
 ?>