Changeset 22268


Ignore:
Timestamp:
2013/01/17 18:03:33 (8 years ago)
Author:
m_uehara
Message:

#2030 メールの文字コード・コンテンツタイプを定数に差し替えました。

Location:
branches/version-2_12-multilang
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-multilang/data/class/SC_SendMail.php

    r22100 r22268  
    109109    // 件名の設定 
    110110    function setSubject($subject) { 
    111         $this->subject = mb_encode_mimeheader($subject, 'JIS', 'B', "\n"); 
     111        $this->subject = mb_encode_mimeheader($subject, MAIL_CHARACTER_CODE, 'B', "\n"); 
    112112        $this->subject = str_replace(array("\r\n", "\r"), "\n", $this->subject); 
    113113    } 
     
    115115    // 本文の設定 
    116116    function setBody($body) { 
    117         // iso-2022-jpだと特殊文字が?で送信されるのでJISを使用する 
    118         $this->body = mb_convert_encoding($body, 'JIS', CHAR_CODE); 
     117        $this->body = mb_convert_encoding($body, MAIL_CHARACTER_CODE, CHAR_CODE); 
    119118    } 
    120119 
     
    157156                // 制御文字を変換する。 
    158157                $_name = $name; 
    159                 $_name = mb_encode_mimeheader($_name, 'JIS', 'B', "\n"); 
     158                $_name = mb_encode_mimeheader($_name, MAIL_CHARACTER_CODE, 'B', "\n"); 
    160159                $_name = str_replace('"', '\"', $_name); 
    161160                $name_address = sprintf('"%s" <%s>', $_name, $mail_address); 
     
    238237    function getTEXTHeader() { 
    239238        $arrHeader = $this->getBaseHeader(); 
    240         $arrHeader['Content-Type'] = 'text/plain; charset="ISO-2022-JP"'; 
     239        $arrHeader['Content-Type'] = 'text/plain; charset="' . MAIL_HEADER_CONTENT_TYPE . '"'; 
    241240        return $arrHeader; 
    242241    } 
     
    245244    function getHTMLHeader() { 
    246245        $arrHeader = $this->getBaseHeader(); 
    247         $arrHeader['Content-Type'] = 'text/html; charset="ISO-2022-JP"'; 
     246        $arrHeader['Content-Type'] = 'text/html; charset="' . MAIL_HEADER_CONTENT_TYPE . '"'; 
    248247        return $arrHeader; 
    249248    } 
  • branches/version-2_12-multilang/data/mtb_constants_init.php

    r22205 r22268  
    473473/** MYページ:ご注文状況表示フラグ */ 
    474474define('MYPAGE_ORDER_STATUS_DISP_FLAG', true); 
     475/** メールの文字コード */ 
     476define('MAIL_CHARACTER_CODE', 'JIS'); 
     477/** メールヘッダーのコンテンツタイプ */ 
     478define('MAIL_HEADER_CONTENT_TYPE', 'ISO-2022-JP'); 
  • branches/version-2_12-multilang/data/mtb_constants_init_en-US.php

    r22266 r22268  
    473473/** MY page: Order status display flag */ 
    474474define('MYPAGE_ORDER_STATUS_DISP_FLAG', true); 
    475  
     475/** メールの文字コード */ 
     476define('MAIL_CHARACTER_CODE', 'UTF-8'); 
     477/** メールヘッダーのコンテンツタイプ */ 
     478define('MAIL_HEADER_CONTENT_TYPE', 'US-ASCII'); 
  • branches/version-2_12-multilang/html/install/sql/insert_data.sql

    r22205 r22268  
    12561256INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('LOGIN_RETRY_INTERVAL', '0', 1411, 'ログイン失敗時の遅延時間(秒)(ブルートフォースアタック対策)'); 
    12571257INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MYPAGE_ORDER_STATUS_DISP_FLAG', 'true', 1412, 'MYページ:ご注文状況表示フラグ'); 
     1258INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MAIL_CHARACTER_CODE', '"JIS"', 1413, 'メールの文字コード'); 
     1259INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MAIL_HEADER_CONTENT_TYPE', '"ISO-2022-JP"', 1414, 'メールヘッダーのコンテンツタイプ'); 
    12581260 
    12591261INSERT INTO dtb_index_list (table_name, column_name, recommend_flg, recommend_comment) VALUES ('dtb_customer', 'email_mobile', 0, '会員数増加時のログイン処理速度を向上させたいときに試してみてください'); 
  • branches/version-2_12-multilang/html/install/sql/insert_data_en-US.sql

    r22266 r22268  
    12451245INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('LOGIN_RETRY_INTERVAL', '0', 1411, 'Delay time when login fails (seconds) (measure against brute force attack)'); 
    12461246INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MYPAGE_ORDER_STATUS_DISP_FLAG', 'true', 1412, 'MY page: Order status display flag'); 
     1247INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MAIL_CHARACTER_CODE', '"UTF-8"', 1413, 'メールの文字コード'); 
     1248INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MAIL_HEADER_CONTENT_TYPE', '"US-ASCII"', 1414, 'メールヘッダーのコンテンツタイプ'); 
    12471249 
    12481250INSERT INTO dtb_index_list (table_name, column_name, recommend_flg, recommend_comment) VALUES ('dtb_customer', 'email_mobile', 0, 'Try when you want to improve the login processing speed when there is an increase in the number of members'); 
Note: See TracChangeset for help on using the changeset viewer.