Ignore:
Timestamp:
07/26/12 11:49:17 (12 years ago)
Author:
marcosw
Message:

Ticket #2897 - Realizado backport da funcionalidade Responder a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r6877 r6882  
    13551355                $reply_to = $header->reply_to; 
    13561356                $return['reply_to'] = ""; 
     1357                 
    13571358                if (is_object($reply_to[0])) 
    13581359                { 
    13591360                        if ($return['from']['email'] != ($reply_to[0]->mailbox."@".$reply_to[0]->host)) 
    13601361                        { 
    1361                                 if (!empty($reply_to[0]->personal)) 
     1362                                foreach ($reply_to as $tmp_reply_to) 
    13621363                                { 
    1363                                         $personal_reply_to = $this->formatMailObject($tmp_reply_to); 
    1364                                         if(!empty($personal_reply_to[0]->text)) { 
    1365                                                 $return['reply_to'] .= '"' . $personal_reply_to['name']. '"'; 
     1364                                        if (!empty($tmp_reply_to->personal)) 
     1365                                        { 
     1366                                                $personal_tmp_reply_to = $this->formatMailObject($tmp_reply_to); 
     1367                                                $return['reply_to'] .= '"' . $personal_tmp_reply_to['name'] . '"'; 
    13661368                                                $return['reply_to'] .= " "; 
    13671369                                                $return['reply_to'] .= "<"; 
    1368                                                 $return['reply_to'] .= $personal_reply_to['email']; 
     1370                                                $return['reply_to'] .= $personal_tmp_reply_to['email']; 
    13691371                                                $return['reply_to'] .= ">"; 
     1372                                                $return['reply_to'] .= ", "; 
    13701373                                        } 
    1371                                         else { 
    1372                                                 $return['reply_to'] .= $reply_to[0]->mailbox . "@" . $reply_to[0]->host; 
     1374                                        else 
     1375                                        { 
     1376                                                if (isset($tmp_reply_to->host) && $tmp_reply_to->host != 'unspecified-domain') 
     1377                                                        $return['reply_to'] .= $tmp_reply_to->mailbox . "@" . $tmp_reply_to->host; 
     1378                                                else 
     1379                                                        $return['reply_to'] .= $tmp_reply_to->mailbox; 
     1380                                                $return['reply_to'] .= ", "; 
    13731381                                        } 
    13741382                                } 
    1375                                 else 
    1376                                 { 
    1377                                         $return['reply_to'] .= $reply_to[0]->mailbox . "@" . $reply_to[0]->host; 
    1378                                 } 
    1379                         } 
    1380                 } 
    1381                 $return['reply_to'] = $this->decode_string($return['reply_to']); 
     1383                                $return['reply_to'] = $this->del_last_two_caracters($return['reply_to']); 
     1384                        } 
     1385                } 
     1386                else 
     1387                { 
     1388                        $return['reply_to'] = ""; 
     1389                } 
     1390 
    13821391                $return['subject'] = ( isset($header->subject) && trim($header->subject) !== '' ) ?  self::decodeMimeString($header->subject) : $this->functions->getLang('(no subject)   '); 
    13831392 
     
    13981407                }   
    13991408                $return['alarm'] = $alarm; 
    1400          
     1409                 
    14011410                return $return; 
    14021411        } 
     
    25932602            $ccoaddress = preg_replace('/\s+>/', '>', $ccoaddress); 
    25942603 
    2595             $replytoaddress = $params['input_replyto']; 
     2604            $replytoaddress = $params['input_reply_to']; 
    25962605            $subject = $params['input_subject']; 
    25972606            $return_receipt = $params['input_return_receipt']; 
     
    27782787            else 
    27792788                $mailService->setFrom('"' . $_SESSION['phpgw_info']['expressomail']['user']['firstname'] . ' ' . $_SESSION['phpgw_info']['expressomail']['user']['lastname'] . '" <' . $_SESSION['phpgw_info']['expressomail']['user']['email'] . '>'); 
     2789             
     2790            $mailService->addHeaderField('Reply-To', $replytoaddress); 
    27802791 
    27812792            $bol = $this->add_recipients('to', $toaddress, $mailService); 
Note: See TracChangeset for help on using the changeset viewer.