--- Imap.php 2008-11-10 17:47:18.000000000 +0600 +++ Imap.php.fixed 2009-08-10 19:05:40.489883700 +0700 @@ -208,7 +208,7 @@ $token = substr($token, 1); } if ($token[0] == '"') { - if (preg_match('%^"((.|\\\\|\\")*?)" *%', $line, $matches)) { + if (preg_match('%^\(*"((.|\\\\|\\")*?)" *%', $line, $matches)) { $tokens[] = $matches[1]; $line = substr($line, strlen($matches[0])); continue;