Changeset 319


Ignore:
Timestamp:
2007/02/21 21:03:41 (17 years ago)
Author:
naka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/class/GC_SendMail.php

    r29 r319  
    3535            $name = ereg_replace("<","¡ã", $to_name); 
    3636            $name = ereg_replace(">","¡ä", $name); 
    37             $name = mb_encode_mimeheader($name); 
     37            $name = mb_encode_mimeheader(mb_convert_encoding($name, "JIS", CHAR_CODE)); 
    3838            $this->to = $name . "<" . $to . ">"; 
    3939        } else { 
     
    4646        $this->to            = $to; 
    4747        $this->subject       = $subject; 
    48         $this->body          = $body; 
     48 
     49        // iso-2022-jp¤À¤ÈÆüìʸ»ú¤¬¡©¤ÇÁ÷¿®¤µ¤ì¤ë¤Î¤ÇJIS¤ò»ÈÍѤ¹¤ë¡£ 
     50        $this->body          = mb_convert_encoding( $body, "JIS", CHAR_CODE); 
     51 
    4952        // ¥Ø¥Ã¥À¡¼¤ËÆüËܸì¤ò»ÈÍѤ¹¤ë¾ì¹ç¤ÏMb_encode_mimeheader¤Ç¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ 
    5053        $from_name = ereg_replace("<","¡ã", $from_name); 
    5154        $from_name = ereg_replace(">","¡ä", $from_name); 
    52                  
     55        $from_name = mb_convert_encoding($from_name,"JIS",CHAR_CODE);  
     56 
    5357        $this->header        = "From: ". Mb_encode_mimeheader( $from_name )."<".$fromaddress.">\n"; 
    5458        $this->header       .= "Reply-To: ". $reply_to . "\n"; 
     
    5660        $this->header       .= "Bcc: " . $bcc . "\n"; 
    5761        $this->header       .= "Errors-To: ". $errors_to ."\n"; 
    58         // return_path¤Ï¡¢¥á¡¼¥ë¥Ø¥Ã¥À¡¼¾å¤Ë·Ù¹ð¤¬É½¼¨¤µ¤ì¤ë¤Î¤ÇÍøÍѤ·¤Ê¤¤¡£ 
    59         $return_path = ""; 
     62         
     63        $this->return_path   = $return_path; 
    6064    } 
    6165 
    62      
    6366    function setItemHtml( $to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to="", $bcc="", $cc ="" ) { 
    6467             
    6568        $this->to            = $to; 
    66         $this->subject       = Mb_encode_mimeheader($subject); 
    67         $this->body          = mb_convert_encoding( $body, "iso-2022-jp", CHAR_CODE); 
     69        $this->subject       = $subject; 
     70        $this->body          = mb_convert_encoding( $body, "JIS", CHAR_CODE); 
    6871        $this->header        = "Mime-Version: 1.0\n"; 
    6972        $this->header       .= "Content-Type: text/html; charset=iso-2022-jp\n"; 
     
    7477        $this->header       .= "Bcc: " . $bcc . "\n"; 
    7578        $this->header       .= "Errors-To: ". $errors_to ."\n"; 
    76         // return_path¤Ï¡¢¥á¡¼¥ë¥Ø¥Ã¥À¡¼¾å¤Ë·Ù¹ð¤¬É½¼¨¤µ¤ì¤ë¤Î¤ÇÍøÍѤ·¤Ê¤¤¡£ 
    77         $return_path = ""; 
     79        $this->return_path   = $return_path; 
    7880    } 
    7981 
     
    8284 
    8385        Mb_language( "Japanese" ); 
    84                  
     86         
    8587        //¡¡¥á¡¼¥ëÁ÷¿® 
    86         if( mb_send_mail( $this->to, $this->subject, $this->body, $this->header) ) { 
     88        if( mb_send_mail( $this->to, $this->subject, $this->body, $this->header, "" . $this->return_path ) ) { 
    8789            return true; 
    8890        } 
     
    9597         
    9698        //¡¡¥á¡¼¥ëÁ÷¿® 
    97         if( mail( $this->to, $this->subject, $this->body, $this->header) ) { 
     99        if( mail( $this->to, $this->subject, $this->body, $this->header, "" . $this->return_path ) ) { 
    98100            return true; 
    99101        } 
Note: See TracChangeset for help on using the changeset viewer.