Changeset 319
- Timestamp:
- 2007/02/21 21:03:41 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/data/class/GC_SendMail.php
r29 r319 35 35 $name = ereg_replace("<","¡ã", $to_name); 36 36 $name = ereg_replace(">","¡ä", $name); 37 $name = mb_encode_mimeheader( $name);37 $name = mb_encode_mimeheader(mb_convert_encoding($name, "JIS", CHAR_CODE)); 38 38 $this->to = $name . "<" . $to . ">"; 39 39 } else { … … 46 46 $this->to = $to; 47 47 $this->subject = $subject; 48 $this->body = $body; 48 49 // iso-2022-jp¤À¤ÈÆüìʸ»ú¤¬¡©¤ÇÁ÷¿®¤µ¤ì¤ë¤Î¤ÇJIS¤ò»ÈÍѤ¹¤ë¡£ 50 $this->body = mb_convert_encoding( $body, "JIS", CHAR_CODE); 51 49 52 // ¥Ø¥Ã¥À¡¼¤ËÆüËܸì¤ò»ÈÍѤ¹¤ë¾ì¹ç¤ÏMb_encode_mimeheader¤Ç¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ 50 53 $from_name = ereg_replace("<","¡ã", $from_name); 51 54 $from_name = ereg_replace(">","¡ä", $from_name); 52 55 $from_name = mb_convert_encoding($from_name,"JIS",CHAR_CODE); 56 53 57 $this->header = "From: ". Mb_encode_mimeheader( $from_name )."<".$fromaddress.">\n"; 54 58 $this->header .= "Reply-To: ". $reply_to . "\n"; … … 56 60 $this->header .= "Bcc: " . $bcc . "\n"; 57 61 $this->header .= "Errors-To: ". $errors_to ."\n"; 58 // return_path¤Ï¡¢¥á¡¼¥ë¥Ø¥Ã¥À¡¼¾å¤Ë·Ù¹ð¤¬É½¼¨¤µ¤ì¤ë¤Î¤ÇÍøÍѤ·¤Ê¤¤¡£59 $ return_path = "";62 63 $this->return_path = $return_path; 60 64 } 61 65 62 63 66 function setItemHtml( $to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to="", $bcc="", $cc ="" ) { 64 67 65 68 $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); 68 71 $this->header = "Mime-Version: 1.0\n"; 69 72 $this->header .= "Content-Type: text/html; charset=iso-2022-jp\n"; … … 74 77 $this->header .= "Bcc: " . $bcc . "\n"; 75 78 $this->header .= "Errors-To: ". $errors_to ."\n"; 76 // return_path¤Ï¡¢¥á¡¼¥ë¥Ø¥Ã¥À¡¼¾å¤Ë·Ù¹ð¤¬É½¼¨¤µ¤ì¤ë¤Î¤ÇÍøÍѤ·¤Ê¤¤¡£ 77 $return_path = ""; 79 $this->return_path = $return_path; 78 80 } 79 81 … … 82 84 83 85 Mb_language( "Japanese" ); 84 86 85 87 //¡¡¥á¡¼¥ëÁ÷¿® 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 ) ) { 87 89 return true; 88 90 } … … 95 97 96 98 //¡¡¥á¡¼¥ëÁ÷¿® 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 ) ) { 98 100 return true; 99 101 }
Note: See TracChangeset
for help on using the changeset viewer.