summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/lib/imap.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index da709faf3..42aa0fa61 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -2575,8 +2575,8 @@ function iil_C_FetchStructureString(&$conn, $folder, $id) {
do {
$line = iil_ReadLine($fp, 5000);
$line = iil_MultLine($fp, $line);
- list(, $index, $rest) = explode(' ', $line);
- if ($index == $id || preg_match("/^$key/", $line))
+ list(, $index, $cmd, $rest) = explode(' ', $line);
+ if ($cmd != 'FETCH' || $index == $id)
$result .= $line;
} while (!preg_match("/^$key/", $line));