fixed some bugs in the sqimap_mailbox_close() function
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 10 Aug 2000 15:10:16 +0000 (15:10 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 10 Aug 2000 15:10:16 +0000 (15:10 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@697 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/imap_mailbox.php
functions/smtp.php
src/compose.php

index 6d511260e40c7ed34a73d08df269bf4cfb411807..e10cd64181cd1e21d066e35bba3861047ee9491e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 Version 0.5pre2 -- DEVELOPMENT
 ------------------------------
+- Fixed some buggy IMAP handling
 - Improved word wrapping
 - Made message highlighting not case sensative
 - Added French translation from Ali Nedjimi <lrdfrx@club-internet.fr>
index 384582632fd4a3e591acbd432561b016332e82a1..422638ed3193150b8a06adb94ac9cfce9ade72ad 100755 (executable)
@@ -36,7 +36,7 @@
     ******************************************************************************/
    function sqimap_mailbox_close ($imap_stream) {
       fputs ($imap_stream, "a001 CLOSE\r\n");
-      $tmp = sqimap_read_data($imap_stream, "a001", close, $response, $message);
+      $tmp = sqimap_read_data($imap_stream, "a001", false, $response, $message);
    }
 
    /******************************************************************************
index 8402f282ff6a64080689a5968a931b8ac30e9910..eecd74faa3c7b14783117a0e40228f67a391085c 100644 (file)
          sqimap_mailbox_select ($imap_stream, $mailbox);
          sqimap_messages_flag ($imap_stream, $reply_id, $reply_id, "Answered");
 
-        // Insert In-Reply-To and References headers if the 
-        // message-id of the message we reply to is set (longer than "<>")
-        // The References header should really be the old Referenced header
-        // with the message ID appended, but it can be only the message ID too.
-        $hdr = sqimap_get_small_header ($imap_stream, $reply_id, false);
-        if(strlen($hdr->message_id) > 2) {
-           $more_headers["In-Reply-To"] = $hdr->message_id;
-           $more_headers["References"]  = $hdr->message_id;
-        }
+         // Insert In-Reply-To and References headers if the 
+         // message-id of the message we reply to is set (longer than "<>")
+         // The References header should really be the old Referenced header
+         // with the message ID appended, but it can be only the message ID too.
+         $hdr = sqimap_get_small_header ($imap_stream, $reply_id, false);
+         if(strlen($hdr->message_id) > 2) {
+            $more_headers["In-Reply-To"] = $hdr->message_id;
+            $more_headers["References"]  = $hdr->message_id;
+         }
+         sqimap_mailbox_close($imap_stream);
       }
       
       if ($useSendmail==true) {  
          writeBody ($imap_stream, $body); 
          sqimap_append_done ($imap_stream);
       }   
-      sqimap_mailbox_close($imap_stream);
       sqimap_logout($imap_stream); 
       // Delete the files uploaded for attaching (if any).
       deleteAttachments();
index e77b3a87a6c7ea4ccd84477a3e932f240fddce04..92e4c2451093d5df9811b55d40beec08f64a65c6 100644 (file)
          echo "// --></SCRIPT>\n\n";
       }
 
-      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
-      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
+      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }