alecpl
2008-08-28 876b15dcceeaf5d3f5b2881c8155fcf247cac316
program/steps/mail/func.inc
@@ -457,7 +457,7 @@
 */
function rcmail_quota_content($quota=NULL)
  {
  global $IMAP, $COMM_PATH;
  global $IMAP, $COMM_PATH, $RCMAIL;
  $display = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : '';
@@ -471,7 +471,7 @@
  else
    $quota = $IMAP->get_quota();
  if ($quota)
  if ($quota && !($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited')))
    {
    $quota_text = sprintf('%s / %s (%.0f%%)',
                          show_bytes($quota['used'] * 1024),
@@ -1076,7 +1076,7 @@
  $msg_body = $message->get();
  $headers = $message->headers();
  // send thru SMTP server using custom SMTP library
  if ($CONFIG['smtp_server'])
    {
@@ -1122,8 +1122,19 @@
      $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str, "-f$from");
    }
  
  if ($sent)  // remove MDN headers after sending
  if ($sent)
  {
    // remove MDN headers after sending
    unset($headers['Return-Receipt-To'], $headers['Disposition-Notification-To']);
    if ($CONFIG['smtp_log'])
      write_log('sendmail', sprintf("[%s] User: %d on %s; Message for %s; %s",
      date("d-M-Y H:i:s O", mktime()),
      $_SESSION['user_id'],
      $_SERVER['REMOTE_ADDR'],
      $mailto,
      !empty($smtp_response) ? join('; ', $smtp_response) : ''));
  }
  
  $message->_headers = array();
  $message->headers($headers);