Changeset 14f87f7 in github


Ignore:
Timestamp:
Dec 10, 2010 2:45:52 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
7416ae8
Parents:
3ee5a72
Message:
  • Set Mail-Reply-To also for identity's reply-to
File:
1 edited

Legend:

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

    r3ee5a72 r14f87f7  
    299299 
    300300// additional recipients 
    301 if (!empty($mailcc)) 
     301if (!empty($mailcc)) { 
    302302  $headers['Cc'] = $mailcc; 
    303  
    304 if (!empty($mailbcc)) 
     303} 
     304if (!empty($mailbcc)) { 
    305305  $headers['Bcc'] = $mailbcc; 
    306  
     306} 
    307307if (!empty($identity_arr['bcc'])) { 
    308308  $headers['Bcc'] = ($headers['Bcc'] ? $headers['Bcc'].', ' : '') . $identity_arr['bcc']; 
     
    320320$headers['Subject'] = trim(get_input_value('_subject', RCUBE_INPUT_POST, TRUE, $message_charset)); 
    321321 
    322 if (!empty($identity_arr['organization'])) 
     322if (!empty($identity_arr['organization'])) { 
    323323  $headers['Organization'] = $identity_arr['organization']; 
    324  
     324} 
    325325if (!empty($_POST['_replyto'])) { 
    326   $reply_to = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset)); 
    327   $headers['Reply-To'] = $reply_to; 
    328   $headers['Mail-Reply-To'] = $reply_to; 
    329 } 
    330 else if (!empty($identity_arr['reply-to'])) 
     326  $headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset)); 
     327} 
     328else if (!empty($identity_arr['reply-to'])) { 
    331329  $headers['Reply-To'] = rcmail_email_input_format($identity_arr['reply-to'], false, true); 
    332  
    333 if (!empty($_POST['_followupto'])) 
     330} 
     331if (!empty($headers['Reply-To'])) { 
     332  $headers['Mail-Reply-To'] = $headers['Reply-To']; 
     333} 
     334if (!empty($_POST['_followupto'])) { 
    334335  $headers['Mail-Followup-To'] = rcmail_email_input_format(get_input_value('_followupto', RCUBE_INPUT_POST, TRUE, $message_charset)); 
    335  
    336 if (!empty($_SESSION['compose']['reply_msgid'])) 
     336} 
     337if (!empty($_SESSION['compose']['reply_msgid'])) { 
    337338  $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid']; 
     339} 
    338340 
    339341// remember reply/forward UIDs in special headers 
    340 if (!empty($_SESSION['compose']['reply_uid']) && $savedraft) 
     342if (!empty($_SESSION['compose']['reply_uid']) && $savedraft) { 
    341343  $headers['X-Draft-Info'] = array('type' => 'reply', 'uid' => $_SESSION['compose']['reply_uid']); 
    342 else if (!empty($_SESSION['compose']['forward_uid']) && $savedraft) 
     344} 
     345else if (!empty($_SESSION['compose']['forward_uid']) && $savedraft) { 
    343346  $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => $_SESSION['compose']['forward_uid']); 
    344  
    345 if (!empty($_SESSION['compose']['references'])) 
     347} 
     348 
     349if (!empty($_SESSION['compose']['references'])) { 
    346350  $headers['References'] = $_SESSION['compose']['references']; 
     351} 
    347352 
    348353if (!empty($_POST['_priority'])) { 
    349354  $priority = intval($_POST['_priority']); 
    350355  $a_priorities = array(1=>'highest', 2=>'high', 4=>'low', 5=>'lowest'); 
    351   if ($str_priority = $a_priorities[$priority]) 
     356  if ($str_priority = $a_priorities[$priority]) { 
    352357    $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); 
     358  } 
    353359} 
    354360 
     
    362368$headers['X-Sender'] = $from; 
    363369 
    364 if (is_array($headers['X-Draft-Info'])) 
     370if (is_array($headers['X-Draft-Info'])) { 
    365371  $headers['X-Draft-Info'] = rcmail_draftinfo_encode($headers['X-Draft-Info'] + array('folder' => $_SESSION['compose']['mailbox'])); 
    366  
    367 if (!empty($CONFIG['useragent'])) 
     372} 
     373if (!empty($CONFIG['useragent'])) { 
    368374  $headers['User-Agent'] = $CONFIG['useragent']; 
     375} 
    369376 
    370377// exec hook for header checking and manipulation 
Note: See TracChangeset for help on using the changeset viewer.