Squash IMAP errors when auto-fetching; fix was previously applied, but only to fetch.php
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Sep 2004 20:43:03 +0000 (20:43 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Sep 2004 20:43:03 +0000 (20:43 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8065 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/mail_fetch/setup.php

index e099ce1..ec98544 100644 (file)
                     }
 
                     if ($mailfetch_subfolder=="") {
-                        fputs($imap_stream, "A3$i APPEND INBOX {" . (strlen($Message) - 1) . "}\r\n");
+                        fputs($imap_stream, "A3$i APPEND INBOX {" . strlen($Message) . "}\r\n");
                     } else {
-                        fputs($imap_stream, "A3$i APPEND $mailfetch_subfolder {" . (strlen($Message) - 1) . "}\r\n");
+                        fputs($imap_stream, "A3$i APPEND $mailfetch_subfolder {" . strlen($Message) . "}\r\n");
                     }
                     $Line = fgets($imap_stream, 1024);
                     if (substr($Line, 0, 1) == '+') {
                         fputs($imap_stream, $Message);
+                        fputs($imap_stream, "\r\n");
                         sqimap_read_data($imap_stream, "A3$i", false, $response, $message);
 
                         if ($mailfetch_lmos != 'on') {
       );
    }
 
-?>
\ No newline at end of file
+?>