alecpl
2008-04-10 3790508c2003255c179b6f4d309d5feeaa2b6299
program/steps/mail/func.inc
@@ -411,7 +411,7 @@
  $OUTPUT->add_gui_object('quotadisplay', $attrib['id']);
  // allow the following attributes to be added to the <span> tag
  $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));
  $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id', 'display'));
  $out = '<span' . $attrib_str . '>';
  $out .= rcmail_quota_content($attrib['display']);
@@ -679,8 +679,8 @@
    $convert_patterns[] = '/([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9]\\.[a-z]{2,5})/ie';
    $convert_replaces[] = "rcmail_str_replacement('<a href=\"mailto:\\1\" onclick=\"return ".JS_OBJECT_NAME.".command(\'compose\',\'\\1\',this)\">\\1</a>', \$replace_strings)";
    
    if ($part->ctype_parameters['format'] != 'flowed')
      $body = wordwrap(trim($body), 80);
//    if ($part->ctype_parameters['format'] != 'flowed')
//      $body = wordwrap(trim($body), 80);
    $body = preg_replace($convert_patterns, $convert_replaces, $body);
@@ -695,10 +695,10 @@
      $quotation = '';
      $q = 0;
      
      if (preg_match('/^(>+\s*)/', $line, $regs))
      if (preg_match('/^(>+\s*)+/', $line, $regs))
        {
        $q = strlen(preg_replace('/\s/', '', $regs[1]));
        $line = substr($line, strlen($regs[1]));
        $q    = strlen(preg_replace('/\s/', '', $regs[0]));
        $line = substr($line, strlen($regs[0]));
        if ($q > $quote_level)
          $quotation = str_repeat('<blockquote>', $q - $quote_level);
@@ -1435,6 +1435,8 @@
      $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str, "-f$from");
    }
  
  if ($sent)  // remove MDN headers after sending
    unset($headers['Return-Receipt-To'], $headers['Disposition-Notification-To']);
  
  $message->_headers = array();
  $message->headers($headers);