Ignore:
Timestamp:
05/21/12 11:36:14 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Alterado implementação do campo "to" na lista de mensagens, conforme 2.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/rest/mail/MessagesResource.php

    r6226 r6247  
    5757                        $msg['msgFrom']['fullName'] = $imap_msg['from']['name']; 
    5858                        $msg['msgFrom']['mailAddress'] = $imap_msg['from']['email']; 
    59                         $msg['msgTo'][0]['fullName'] = $imap_msg['to']['name']; 
    60                         $msg['msgTo'][0]['mailAddress'] = $imap_msg['to']['email']; 
     59                        $msg['msgTo'] = array(); 
     60                        if($this->getExpressoVersion() != "2.2") { 
     61                                foreach($imap_msg['to'] as $to){ 
     62                                        $msg['msgTo'][] = array('fullName' => $to['name'], 'mailAddress' => $to['email']); 
     63                                } 
     64                        }else{ 
     65                                $msg['msgTo'][] = array('fullName' => $imap_msg['to']['name'], 'mailAddress' => $imap_msg['to']['email']); 
     66                        } 
    6167                        $msg['msgReplyTo'][0] = $this->formatMailObject($imap_msg['reply_toaddress']); 
    6268                        $msg['msgSubject']  = mb_convert_encoding($imap_msg['subject'],"UTF8", "ISO_8859-1"); 
Note: See TracChangeset for help on using the changeset viewer.