Changeset 6489


Ignore:
Timestamp:
06/14/12 11:16:27 (7 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Corrigido problema no envio de mensagens com anexos.

Location:
sandbox/webservice/api
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/adapters/MailAdapter.php

    r6256 r6489  
    5050                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] : "50"; 
    5151                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] : "4";                        
    52                         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ''; 
     52                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ini_get('upload_max_filesize'); 
    5353                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] : "0"; 
    5454                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] = $current_config['expressoMail_imap_max_folders']; 
     
    6363                        $_SESSION['phpgw_info']['expressomail']['user']['userid'] = $GLOBALS['phpgw_info']['user']['userid']; 
    6464                        $_SESSION['phpgw_info']['expressomail']['user']['passwd'] = $GLOBALS['phpgw_info']['user']['passwd']; 
     65                        $_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email']; 
    6566                         
    6667                         
  • sandbox/webservice/api/rest/mail/SendResource.php

    r6338 r6489  
    2121                        $params['type']                         = 'textplain'; 
    2222 
    23                         $GLOBALS['phpgw']->preferences->read_repository(); 
    24                         $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
    25                         $boemailadmin = CreateObject('emailadmin.bo'); 
    26                         $emailadmin_profile = $boemailadmin->getProfileList(); 
    27                         $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 
    28                         $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server']; 
    29                         $_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email']; 
    30  
    31                         $expressoMail = CreateObject('expressoMail1_2.imap_functions'); 
    32                         $returncode   = $expressoMail->send_mail($params); 
    33  
     23                        $returncode = $this->getImap()->send_mail($params); 
    3424                        if (!$returncode || !(is_array($returncode) && $returncode['success'] == true)) 
    3525                                Errors::runException("MAIL_NOT_SENT"); 
Note: See TracChangeset for help on using the changeset viewer.