Ignore:
Timestamp:
Feb 19, 2006 1:34:34 PM (7 years ago)
Author:
roundcube
Message:

Applied several patches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/sendmail.inc

    r133 r140  
    124124  $headers['Reply-To'] = $identity_arr['reply-to']; 
    125125 
    126 if ($_SESSION['compose']['reply_msgid']) 
     126if (!empty($_SESSION['compose']['reply_msgid'])) 
    127127  $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid']; 
    128128 
     129if (!empty($_SESSION['compose']['references'])) 
     130  $headers['References'] = $_SESSION['compose']['references']; 
    129131 
    130132if ($_POST['_priority']) 
     
    181183 
    182184 
     185// chose transfer encoding 
     186$charset_7bit = array('ASCII', 'ISO-2022-JP', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-15'); 
     187$transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7bit' : '8bit'; 
     188 
    183189// encoding settings for mail composing 
    184 $message_param = array('text_encoding' => '8bit', 
     190$message_param = array('text_encoding' => $transfer_encoding, 
    185191                       'html_encoding' => 'quoted-printable', 
    186192                       'head_encoding' => 'quoted-printable', 
     
    191197// compose message body and get headers 
    192198$msg_body = $MAIL_MIME->get($message_param); 
     199 
    193200$msg_subject = $headers['Subject']; 
    194  
     201global $MBSTRING; 
     202if ($MBSTRING&&function_exists( "mb_encode_mimeheader")) 
     203  $headers['Subject'] = mb_encode_mimeheader( $headers['Subject'],$message_charset); 
    195204 
    196205// send thru SMTP server using cusotm SMTP library 
Note: See TracChangeset for help on using the changeset viewer.