diff options
author | alecpl <alec@alec.pl> | 2009-04-08 06:21:43 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-04-08 06:21:43 +0000 |
commit | 803b1b7e340b741e02a1dc72da824384db353751 (patch) | |
tree | 10c6c1927a89f9ca90a597f10953622d7af7ca32 /program/lib | |
parent | 779cbe0066b10cbbe754184e4aed33d2502ff456 (diff) |
- Fix opening attachment marks message as read (#1485803)
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/imap.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc index 67a2b7b3c..394a190b0 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -2433,7 +2433,7 @@ function iil_C_FetchMIMEHeaders(&$conn, $mailbox, $id, $parts) { // format request foreach($parts as $part) - $peeks[] = "BODY[$part.MIME]"; + $peeks[] = "BODY.PEEK[$part.MIME]"; $request = "$key FETCH $id (" . implode(' ', $peeks) . ')'; @@ -2446,9 +2446,9 @@ function iil_C_FetchMIMEHeaders(&$conn, $mailbox, $id, $parts) { $line = iil_ReadLine($fp, 1000); $line = iil_MultLine($fp, $line); - if (preg_match('/BODY\[([0-9\.]+)\.MIME\]/', $line, $matches)) { + if (preg_match('/BODY\.PEEK\[([0-9\.]+)\.MIME\]/', $line, $matches)) { $idx = $matches[1]; - $result[$idx] = preg_replace('/^(\* '.$id.' FETCH \()?\s*BODY\['.$idx.'\.MIME\]\s+/', '', $line); + $result[$idx] = preg_replace('/^(\* '.$id.' FETCH \()?\s*BODY\.PEEK\['.$idx.'\.MIME\]\s+/', '', $line); $result[$idx] = trim($result[$idx], '"'); $result[$idx] = rtrim($result[$idx], "\t\r\n\0\x0B"); } |