alecpl
2008-05-01 7ec922fdf5817750c29bcb1748e50d799db2eb00
program/steps/mail/func.inc
@@ -71,10 +71,10 @@
  $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
if (!$OUTPUT->ajax_call)
  rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash');
  rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
// set page title
if (empty($_action) || $_action == 'list')
if (empty($RCMAIL->action) || $RCMAIL->action == 'list')
  $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));
@@ -970,7 +970,7 @@
      continue;
    if ($hkey=='date' && !empty($headers[$hkey]))
      $header_value = format_date(strtotime($headers[$hkey]));
      $header_value = format_date($headers[$hkey]);
    else if (in_array($hkey, array('from', 'to', 'cc', 'bcc', 'reply-to')))
      $header_value = Q(rcmail_address_string($headers[$hkey], NULL, $attrib['addicon']), 'show');
    else
@@ -1139,7 +1139,8 @@
  // add comments arround html and other tags
  $out = preg_replace(array(
      '/(<!DOCTYPE.+)/i',
      '/(<!DOCTYPE[^>]*>)/i',
      '/(<\?xml[^>]*>)/i',
      '/(<\/?html[^>]*>)/i',
      '/(<\/?head[^>]*>)/i',
      '/(<title[^>]*>.*<\/title>)/Ui',
@@ -1418,10 +1419,12 @@
    // clean Bcc from header for recipients
    $send_headers = $headers;
    unset($send_headers['Bcc']);
    // here too, it because txtHeaders() below use $message->_headers not only $send_headers
    unset($message->_headers['Bcc']);
    // send message
    $smtp_response = array();
    $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers)), $msg_body, $smtp_response);
    $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body, $smtp_response);
    // log error
    if (!$sent)
@@ -1472,7 +1475,7 @@
    $recipient = array_shift($IMAP->decode_address_list($message['headers']->mdn_to));
    $mailto = $recipient['mailto'];
    $compose = new rc_mail_mime(rcmail_header_delm());
    $compose = new rcube_mail_mime(rcmail_header_delm());
    $compose->setParam(array(
      'text_encoding' => 'quoted-printable',
      'html_encoding' => 'quoted-printable',
@@ -1499,7 +1502,7 @@
    $body = rcube_label("yourmessage") . "\r\n\r\n" .
      "\t" . rcube_label("to") . ': ' . rcube_imap::decode_mime_string($message['headers']->to, $message['headers']->charset) . "\r\n" .
      "\t" . rcube_label("subject") . ': ' . $message['subject'] . "\r\n" .
      "\t" . rcube_label("sent") . ': ' . format_date(strtotime($message['headers']->date), $CONFIG['date_long']) . "\r\n" .
      "\t" . rcube_label("sent") . ': ' . format_date($message['headers']->date, $CONFIG['date_long']) . "\r\n" .
      "\r\n" . rcube_label("receiptnote") . "\r\n";
    
    $ua = !empty($CONFIG['useragent']) ? $CONFIG['useragent'] : "RoundCube Webmail (Version ".RCMAIL_VERSION.")";