Changeset 20538 for branches/version-2_5-dev/data/class/SC_SendMail.php
- Timestamp:
- 2011/03/07 15:23:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_SendMail.php
r19940 r20538 49 49 $this->host = SMTP_HOST; 50 50 $this->port = SMTP_PORT; 51 mb_language( "Japanese");51 mb_language( 'Japanese' ); 52 52 53 53 //-- PEAR::Mailを使ってメール送信オブジェクト作成 … … 65 65 if($to != "") { 66 66 $this->to = $this->getNameAddress($to_name, $to); 67 $this->setRecip( "To", $to);67 $this->setRecip('To', $to); 68 68 } 69 69 } … … 78 78 if($cc != "") { 79 79 $this->cc = $this->getNameAddress($cc_name, $cc); 80 $this->setRecip( "Cc", $cc);80 $this->setRecip('Cc', $cc); 81 81 } 82 82 } … … 86 86 if($bcc != "") { 87 87 $this->bcc = $bcc; 88 $this->setRecip( "Bcc", $bcc);88 $this->setRecip('Bcc', $bcc); 89 89 } 90 90 } … … 104 104 // 件名の設定 105 105 function setSubject($subject) { 106 $this->subject = mb_encode_mimeheader($subject, "JIS", 'B', "\n");106 $this->subject = mb_encode_mimeheader($subject, 'JIS', 'B', "\n"); 107 107 $this->subject = str_replace("\x0D\x0A", "\n", $this->subject); 108 108 $this->subject = str_replace("\x0D", "\n", $this->subject); … … 112 112 // 本文の設定 113 113 function setBody($body) { 114 $this->body = mb_convert_encoding($body, "JIS", CHAR_CODE);114 $this->body = mb_convert_encoding($body, 'JIS', CHAR_CODE); 115 115 } 116 116 … … 123 123 ); 124 124 //-- PEAR::Mailを使ってメール送信オブジェクト作成 125 $this->objMail =& Mail::factory( "smtp", $arrHost);125 $this->objMail =& Mail::factory('smtp', $arrHost); 126 126 127 127 } … … 135 135 ); 136 136 //-- PEAR::Mailを使ってメール送信オブジェクト作成 137 $this->objMail =& Mail::factory( "smtp", $arrHost);137 $this->objMail =& Mail::factory('smtp', $arrHost); 138 138 } 139 139 … … 145 145 $_name = ereg_replace("<","<", $_name); 146 146 $_name = ereg_replace(">",">", $_name); 147 $_name = mb_encode_mimeheader($_name, "JIS", 'B', "\n");147 $_name = mb_encode_mimeheader($_name, 'JIS', 'B', "\n"); 148 148 $name_address = "\"". $_name . "\"<" . $mail_address . ">"; 149 149 } else { … … 244 244 switch ($this->backend) { 245 245 // PEAR::Mail_mail#send は、(他のメーラーバックエンドと異なり) 第1引数を To: として扱う。Cc: や Bcc: は、ヘッダー情報から処理する。 246 case "mail":246 case 'mail': 247 247 return $this->to; 248 248 break; 249 case "sendmail":250 case "smtp":249 case 'sendmail': 250 case 'smtp': 251 251 default: 252 252 return $this->arrRecip; … … 292 292 function getBackendParams($backend) { 293 293 switch ($backend) { 294 case "mail":294 case 'mail': 295 295 $arrParams = array(); 296 296 break; 297 case "sendmail":297 case 'sendmail': 298 298 $arrParams = array('sendmail_path' => '/usr/bin/sendmail', 299 299 'sendmail_args' => '-i' 300 300 ); 301 301 break; 302 case "smtp":302 case 'smtp': 303 303 default: 304 304 $arrParams = array(
Note: See TracChangeset
for help on using the changeset viewer.