summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc6
-rw-r--r--program/steps/mail/get.inc7
-rw-r--r--program/steps/mail/move_del.inc2
-rw-r--r--program/steps/mail/sendmail.inc24
4 files changed, 31 insertions, 8 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 4d80c851e..ca72f7437 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -797,13 +797,13 @@ function rcmail_parse_message($structure, $arg=array(), $recursive=FALSE)
(empty($mail_part->disposition) && ($mail_part->d_parameters['filename'] || $mail_part->d_parameters['name'])))
{
if ($message_ctype_secondary=='related' && $mail_part->headers['content-id'])
- $sa_inline_objects[] = array('filename' => $mail_part->d_parameters['filename'],
+ $sa_inline_objects[] = array('filename' => rcube_imap::decode_mime_string($mail_part->d_parameters['filename']),
'mimetype' => strtolower("$primary_type/$secondary_type"),
'part_id' => $mail_part->mime_id,
'content_id' => preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']));
else if ($mail_part->d_parameters['filename'])
- $a_attachments[] = array('filename' => $mail_part->d_parameters['filename'],
+ $a_attachments[] = array('filename' => rcube_imap::decode_mime_string($mail_part->d_parameters['filename']),
'encoding' => strtolower($mail_part->headers['content-transfer-encoding']),
'mimetype' => strtolower("$primary_type/$secondary_type"),
'part_id' => $mail_part->mime_id,
@@ -811,7 +811,7 @@ function rcmail_parse_message($structure, $arg=array(), $recursive=FALSE)
'content' => $mail_part->body */);
else if ($mail_part->ctype_parameters['name'])
- $a_attachments[] = array('filename' => $mail_part->ctype_parameters['name'],
+ $a_attachments[] = array('filename' => rcube_imap::decode_mime_string($mail_part->ctype_parameters['name']),
'encoding' => strtolower($mail_part->headers['content-transfer-encoding']),
'mimetype' => strtolower("$primary_type/$secondary_type"),
'part_id' => $mail_part->mime_id,
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 9a86177aa..fc6d99d07 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -99,6 +99,13 @@ else if ($_GET['_part'])
header(sprintf('Content-Length: %d', strlen($cont)));
+ // We need to set the following headers to make downloads work using IE in HTTPS mode.
+ if (isset($_SERVER['HTTPS']))
+ {
+ header('Pragma: ');
+ header('Cache-Control: ');
+ }
+
// deliver part content
echo $cont;
exit;
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index 41b11d5d1..e3c7549b4 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -77,7 +77,7 @@ if ($_action=='moveto')
// add new rows from next page (if any)
if ($_GET['_from']!='show' && $pages>1 && $IMAP->list_page < $pages)
{
- $a_headers = $IMAP->list_headers($mbox);
+ $a_headers = $IMAP->list_headers($mbox, null, $_SESSION['sort_col'], $_SESSION['sort_order']);
$a_headers = array_slice($a_headers, -$count, $count);
$commands .= rcmail_js_message_list($a_headers);
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 4d7afb5ec..4531aa311 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -137,8 +137,24 @@ if ($CONFIG['useragent'])
$headers['User-Agent'] = $CONFIG['useragent'];
+// append generic footer to all messages
+if (!empty($CONFIG['generic_message_footer']))
+ {
+ $file = realpath($CONFIG['generic_message_footer']);
+ if($fp = fopen($file, 'r'))
+ {
+ $content = fread($fp, filesize($file));
+ fclose($fp);
+ $_POST['_message'] .= "\r\n" . $content;
+ }
+ }
+
+
+// use the configured delimiter for headers
+$header_delm = $rcmail_config['mail_header_delimiter'] ? $rcmail_config['mail_header_delimiter'] : "\r\n";
+
// create PEAR::Mail_mime instance
-$MAIL_MIME = new Mail_mime("\n");
+$MAIL_MIME = new Mail_mime($header_delm);
$MAIL_MIME->setTXTBody(stripslashes($_POST['_message']), FALSE, TRUE);
//$MAIL_MIME->setTXTBody(wordwrap(stripslashes($_POST['_message'])), FALSE, TRUE);
@@ -158,9 +174,9 @@ if (is_array($_FILES['_attachments']['tmp_name']))
$message_param = array('text_encoding' => '7bit',
'html_encoding' => 'quoted-printable',
'head_encoding' => 'quoted-printable',
- 'head_charset' => 'ISO-8859-1',
- 'html_charset' => 'ISO-8859-1',
- 'text_charset' => 'ISO-8859-1');
+ 'head_charset' => $CHARSET,
+ 'html_charset' => $CHARSET,
+ 'text_charset' => $CHARSET);
// compose message body and get headers
$msg_body = $MAIL_MIME->get($message_param);