Ignore:
Timestamp:
05/15/12 10:47:27 (12 years ago)
Author:
marcieli
Message:

Ticket #2731 - Corrigido listar destinatários no title da coluna Para da pasta Enviados.

File:
1 edited

Legend:

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

    r6178 r6185  
    426426            $return['reply_toaddress'] = isset($header->reply_toaddress) ? self::decodeMimeString($header->reply_toaddress) : ''; 
    427427            $return['flag'] = $header->Unseen.$header->Recent.$header->Flagged.$header->Draft.$header->Answered.$header->Deleted.( $return['attachment'] === '1' ? 'T': '' ); 
    428  
    429             if( isset( $header->to[0] )) 
    430                 $return['to'] = self::formatMailObject( $header->to[0] ); 
    431             else if( isset( $header->cc[0] )) 
    432                 $return['to'] = self::formatMailObject( $header->cc[0] ); 
    433             else if( isset( $header->bcc[0] )) 
    434                 $return['to'] = self::formatMailObject( $header->bcc[0] ); 
    435             else 
     428                         
     429                        if (!empty($header->to)){ 
     430                                foreach ($header->to as $i => $v){ 
     431                                        $return['to'][$i] = self::formatMailObject( $v ); 
     432                                } 
     433                        }  
     434                        else if (!empty($header->cc)){ 
     435                                foreach ($header->cc as $i => $v){ 
     436                                        $return['to'][$i] = self::formatMailObject( $v ); 
     437                                } 
     438                        } 
     439                        else if (!empty($header->bcc)){ 
     440                                foreach ($header->bcc as $i => $v){ 
     441                                        $return['to'][$i] = self::formatMailObject( $v ); 
     442                                } 
     443                        } 
     444                        else 
    436445                $return['to'] = array( 'name' => '' , 'email' => ''); 
    437                   
    438             if($return['to']['name'] == 'undisclosed-recipients@' || $return['to']['name'] == '@') 
    439                 $return['to'] = $return['from']; 
    440   
     446                                 
     447                        if (!empty($return['to'])){ 
     448                                foreach ($return['to'] as $i => $v){ 
     449                                        if($v['name'] == 'undisclosed-recipients@' || $v['name'] == '@') 
     450                                                $return['to'][$i] = $return['from']; 
     451                                } 
     452                        }        
     453 
    441454            if($appendSample !== false) 
    442455                $return['msg_sample'] = $this->get_msg_sample($msg_number); 
Note: See TracChangeset for help on using the changeset viewer.