diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-04 08:01:10 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-04 08:01:10 +0000 |
| commit | 3cd227e34f0eef2cee6eac8a60ccb4dc943e3ce4 (patch) | |
| tree | e49f33a887fa4663f5309e43ae2d16c4c03990c3 /roundcubemail/program/include | |
| parent | a0c3fba23243ddcb976d29a7961b6c4e313424ca (diff) | |
- Don't use mail_header_delimiter when saving mail in IMAP
git-svn-id: https://svn.roundcube.net/trunk@3938 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 7 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_imap_generic.php | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 3aa2132fc..c5b10e626 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -2239,11 +2239,8 @@ class rcube_imap // make sure mailbox exists if ($this->mailbox_exists($mbox_name, true)) { - if ($is_file) { - $separator = rcmail::get_instance()->config->header_delimiter(); - $saved = $this->conn->appendFromFile($mailbox, $message, - $headers, $separator.$separator); - } + if ($is_file) + $saved = $this->conn->appendFromFile($mailbox, $message, $headers); else $saved = $this->conn->append($mailbox, $message); } diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index de57671d4..6cf86fc24 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/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 |
