From 254925d184ec92ea4e4d2ec9fa7a6f7da8959d7e Mon Sep 17 00:00:00 2001 From: lkehresman Date: Mon, 24 Jul 2000 17:23:26 +0000 Subject: [PATCH] fixed bug that couldn't read steve's emails git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@634 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 7c8940c1..b87601f3 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -59,8 +59,13 @@ $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 "$read

"; // isolate the body structure and remove beginning and end parenthesis -- 2.25.1