Ignore:
Timestamp:
01/03/12 14:25:34 (12 years ago)
Author:
gustavo
Message:

Ticket #2410 - Permitir enviar email para grupos, o mesmo esta com erro

File:
1 edited

Legend:

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

    r5266 r5299  
    25852585                                return "The server denied your request to send a mail, you cannot use this mail address."; 
    25862586                } 
     2587ob_start(); 
     2588print_r( "=== LOG BEGIN 1===" . "\n" ); 
     2589print_r( var_export($params['input_to'])  . "\n" ); 
     2590print_r( "=== LOG END ===" . "\n" ); 
     2591$output = ob_get_clean(); 
     2592file_put_contents( '/tmp/log-gustavo2.txt', file_get_contents( '/tmp/log-gustavo2.txt' ) . $output ); 
    25872593 
    25882594                $toaddress = implode(',',$db->getAddrs(explode(',',$params['input_to']))); 
    25892595                $ccaddress = implode(',',$db->getAddrs(explode(',',$params['input_cc']))); 
    25902596                $ccoaddress = implode(',',$db->getAddrs(explode(',',$params['input_cco']))); 
     2597 
     2598ob_start(); 
     2599print_r( "=== LOG BEGIN 2===" . "\n" ); 
     2600print_r( $toaddress  . "\n" ); 
     2601print_r( "=== LOG END ===" . "\n" ); 
     2602$output = ob_get_clean(); 
     2603file_put_contents( '/tmp/log-gustavo2.txt', file_get_contents( '/tmp/log-gustavo2.txt' ) . $output ); 
    25912604 
    25922605                $toaddress  = preg_replace('/<\s+/', '<', $toaddress);                   
     
    25982611                $ccoaddress = preg_replace('/<\s+/', '<', $ccoaddress); 
    25992612                $ccoaddress = preg_replace('/\s+>/', '>', $ccoaddress); 
     2613 
     2614ob_start(); 
     2615print_r( "=== LOG BEGIN 3===" . "\n" ); 
     2616print_r( $toaddress  . "\n" ); 
     2617print_r( "=== LOG END ===" . "\n" ); 
     2618$output = ob_get_clean(); 
     2619file_put_contents( '/tmp/log-gustavo2.txt', file_get_contents( '/tmp/log-gustavo2.txt' ) . $output ); 
    26002620                 
    26012621                $replytoaddress = $params['input_replyto']; 
     
    26182638                    $params['input_cco'] = substr($params['input_cco'],0,-1); 
    26192639                 
     2640 
     2641                                ob_start(); 
     2642print_r( "=== LOG BEGIN 3===" . "\n" ); 
     2643print_r( $toaddress  . "\n" ); 
     2644print_r( "=== LOG END ===" . "\n" ); 
     2645$output = ob_get_clean(); 
     2646file_put_contents( '/tmp/log-gustavo2.txt', file_get_contents( '/tmp/log-gustavo2.txt' ) . $output ); 
    26202647 
    26212648                // Valida numero Maximo de Destinatarios  
     
    27942821                //$mailService->addTo($toaddress); 
    27952822                //$mailService->addCc($ccaddress); 
    2796                 $bol = $this->add_recipients('to', $params['input_to'], $mailService); 
     2823                $bol = $this->add_recipients('to', $toaddress, $mailService); 
    27972824                if(!$bol){ 
    27982825                        return $this->parse_error("Invalid Mail:", $toaddress); 
    27992826                } 
    2800                 $bol = $this->add_recipients('cc', $params['input_cc'], $mailService); 
     2827                $bol = $this->add_recipients('cc', $ccaddress, $mailService); 
    28012828                if(!$bol){ 
    28022829                        return $this->parse_error("Invalid Mail:", $ccaddress); 
     
    28072834                                {  
    28082835                        //$mailService->addBcc($ccoaddress); 
    2809                         $bol = $this->add_recipients('cco', $params['input_cco'], $mailService); 
     2836                        $bol = $this->add_recipients('cco', $ccoaddress, $mailService); 
    28102837 
    28112838                        if(!$bol){ 
Note: See TracChangeset for help on using the changeset viewer.