fixed bug that couldn't read steve's emails
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 24 Jul 2000 17:23:26 +0000 (17:23 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 24 Jul 2000 17:23:26 +0000 (17:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@634 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 7c8940c1b9a36e95bc711779acea2b31648241c7..b87601f39baf6622a241ced87cc80c407734258f 100644 (file)
       $id = $header->id;
       fputs ($imap_stream, "a001 FETCH $id BODYSTRUCTURE\r\n");
       $read = fgets ($imap_stream, 10000);
-      $endline = fgets($imap_stream, 1024);
-      $read = strtolower($read);
+      $response = substr($read, 0, 4);
+      while ($response != "a001") {
+         $bodystructure = $read;
+         $read = fgets ($imap_stream, 10000);
+         $response = substr($read, 0, 4);
+      }
+      $read = strtolower($bodystructure);
 
       if ($debug_mime) echo "<tt>$read</tt><br><br>";
       // isolate the body structure and remove beginning and end parenthesis