summaryrefslogtreecommitdiff
path: root/program/lib/imap.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-02-19 18:34:34 +0000
committerthomascube <thomas@roundcube.net>2006-02-19 18:34:34 +0000
commitf88d417c96119b8e50297b930b14fe6ff9a1c5ed (patch)
tree7fc906e485f9a716c0855000ee20cd017587e0ad /program/lib/imap.inc
parent0615a69974d0101d3159511d416bb2c75ffa1ad9 (diff)
Applied several patches
Diffstat (limited to 'program/lib/imap.inc')
-rw-r--r--program/lib/imap.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 48b2cd181..285022247 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -36,7 +36,9 @@
- Parse charset from content-type in iil_C_FetchHeaders()
- Enhanced heaer sorting
- Pass message as reference in iil_C_Append (to save memory)
- - Added BCC to the list of headers to fetch in iil_C_FetchHeaders()
+ - Added BCC and REFERENCE to the list of headers to fetch in iil_C_FetchHeaders()
+ - Leave messageID unchanged in iil_C_FetchHeaders()
+ - Avoid stripslahes in iil_Connect()
- Removed some debuggers (echo ...)
********************************************************/
@@ -303,8 +305,8 @@ function iil_Connect($host, $user, $password){
$iil_errornum = 0;
//strip slashes
- $user = stripslashes($user);
- $password = stripslashes($password);
+ // $user = stripslashes($user);
+ // $password = stripslashes($password);
//set auth method
$auth_method = "plain";
@@ -1208,7 +1210,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set){
/* FETCH date,from,subject headers */
$key="fh".($c++);
- $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID)])\r\n";
+ $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID REFERENCE)])\r\n";
if (!fputs($fp, $request)) return false;
do{
@@ -1263,6 +1265,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set){
$result[$id]->encoding = str_replace("\n", " ", $headers["content-transfer-encoding"]);
$result[$id]->ctype = str_replace("\n", " ", $headers["content-type"]);
$result[$id]->in_reply_to = ereg_replace("[\n<>]",'', $headers['in-reply-to']);
+ $result[$id]->reference = $headers["reference"];
list($result[$id]->ctype, $ctype_add) = explode(";", $headers["content-type"]);
@@ -1270,8 +1273,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set){
$result[$id]->charset = $regs[1];
$messageID = $headers["message-id"];
- if ($messageID) $messageID = substr(substr($messageID, 1), 0, strlen($messageID)-2);
- else $messageID = "mid:".$id;
+ if (!$messageID) "mid:".$id;
$result[$id]->messageID = $messageID;
}
else {