Changeset 3777


Ignore:
Timestamp:
02/17/11 15:21:40 (13 years ago)
Author:
diegomoreno
Message:

Ticket #1528 - expressoMail1_2 - Ajuste exibindo corretamente o 'from' quando envio com copia.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r3774 r3777  
    240240                if(!$head_array['to']['name']) 
    241241                        $head_array['to']['name'] = $head_array['to']['email']; 
     242                $cc = $header->cc; 
     243                if ( ($cc) && (!$head_array['to']['name']) ){ 
     244                        $head_array['to']['name'] = ( isset( $cc[0]->personal ) ) ? $this->decode_string($cc[0]->personal) : NULL; 
     245                        $head_array['to']['email'] = $this->decode_string($cc[0]->mailbox) . "@" . $cc[0]->host; 
     246                        if(!$head_array['to']['name']) 
     247                                $head_array['to']['name'] = $head_array['from']['email']; 
     248                } 
    242249                $head_array['subject'] = ( isset( $header->fetchsubject ) ) ? $this->decode_string($header->fetchsubject) : ''; 
    243250 
     
    16341641                        $return[$i]['to']['email'] = $to[0]->mailbox . "@" . $to[0]->host; 
    16351642                        $return[$i]['to']['full'] ='"' . $return[$i]['to']['name'] . '" ' . '<' . $return[$i]['to']['email'] . '>'; 
    1636  
     1643                        $cc = $header->cc; 
     1644                        if ( ($cc) && (!$return[$i]['to']['name']) ){ 
     1645                                $return[$i]['to']['name'] =  $cc[0]->personal; 
     1646                                $return[$i]['to']['email'] = $cc[0]->mailbox . "@" . $cc[0]->host; 
     1647                        } 
    16371648                        $return[$i]['subject'] = $this->decode_string($header->fetchsubject); 
    16381649 
Note: See TracChangeset for help on using the changeset viewer.