summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap_generic.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-04 08:01:10 +0000
committeralecpl <alec@alec.pl>2010-09-04 08:01:10 +0000
commit272a7e5a24b9f9cb2748809f90be247d4f171465 (patch)
tree2cd74cce28794f3adc43d5a5ed9a80dfd7f8ce2e /program/include/rcube_imap_generic.php
parent086767c8f273e3bdd6c455876ccbcd876041b503 (diff)
- Don't use mail_header_delimiter when saving mail in IMAP
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r--program/include/rcube_imap_generic.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index de57671d4..6cf86fc24 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -1996,7 +1996,7 @@ class rcube_imap_generic
return false;
}
- function appendFromFile($folder, $path, $headers=null, $separator="\n\n")
+ function appendFromFile($folder, $path, $headers=null)
{
if (!$folder) {
return false;
@@ -2012,14 +2012,16 @@ class rcube_imap_generic
return false;
}
+ $body_separator = "\r\n\r\n";
$len = filesize($path);
+
if (!$len) {
return false;
}
if ($headers) {
$headers = preg_replace('/[\r\n]+$/', '', $headers);
- $len += strlen($headers) + strlen($separator);
+ $len += strlen($headers) + strlen($body_separator);
}
// send APPEND command
@@ -2035,7 +2037,7 @@ class rcube_imap_generic
// send headers with body separator
if ($headers) {
- $this->putLine($headers . $separator, false);
+ $this->putLine($headers . $body_separator, false);
}
// send file