From 43a27409ccbdd1ec4a50d14a42064892f3863671 Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 14 Aug 2008 11:09:38 +0000 Subject: Better fix for skipping untagged responses; should also work with long body structres (#1485261) --- program/lib/imap.inc | 4 ++-- 1 file 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)); -- cgit v1.2.3