Show
Ignore:
Timestamp:
05/22/07 04:04:25 (5 years ago)
Author:
john
Message:

fixed ActionMailer? bug in the deliver method now will send again

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_mailer.php

    r217 r289  
    139139         
    140140        if(!is_null($this->subject))  { 
    141             $this->set_header_line("Subject", $this->subject); 
     141            $this->set_header_line("Subject", ereg_replace("[\n\r]", "", $this->subject)); 
    142142        } else { 
    143143            $this->set_header_line("Subject", ""); 
     
    224224        $this->head_charset = $this->head_charset ? $this->head_charset : $this->default_charset; 
    225225        $this->html_charset = $this->html_charset ? $this->html_charset : $this->default_charset; 
    226         $this->text_charset = $this->text_charset ? $this->text_charset : $this->default_charset; 
    227         $this->mime_params = array( 
    228             'head_charset' => $this->head_charset,  
    229             'html_charset' =>  $this->html_charset, 
    230             'text_charset' =>  $this->text_charset 
    231         );          
     226        $this->text_charset = $this->text_charset ? $this->text_charset : $this->default_charset;         
    232227    } 
    233228 
     
    241236            //echo "calling $method_name<br>"; 
    242237            call_user_func_array(array($this, $method_name), $parameters);    
    243         }    
     238        }  
     239        $this->mime_params = array( 
     240            'head_charset' => $this->head_charset,  
     241            'html_charset' =>  $this->html_charset, 
     242            'text_charset' =>  $this->text_charset 
     243        );             
    244244        $this->set_headers(); 
    245245        $body = $this->preparse_body = $this->body; 
     
    258258        $this->body = $this->mail_mime->get($this->mime_params);       
    259259        $this->headers = $this->mail_mime->headers($this->headers);   
    260         $this->headers['Subject'] = ereg_replace("[\n\r]", "", $this->headers['Subject']);  
    261260 
    262261        if($this->delivery_method == "sendmail") { 
     
    342341            } 
    343342            if(!count($this->errors)) {  
    344                 $result = $mail->mail->send(null, $mail->headers, $mail->body); 
     343                $result = $mail->mail->send($mail->headers['To'], $mail->headers, $mail->body); 
    345344                if(is_object($result)) {  
    346345                    $this->errors[] = $result->getMessage();