Ignore:
Timestamp:
2012/02/15 19:56:17 (12 years ago)
Author:
Seasoft
Message:

#1625 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

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

    r21490 r21514  
    3737    function SC_SendMail() { 
    3838        $this->arrRecip = array(); 
    39         $this->to = ""; 
    40         $this->subject = ""; 
    41         $this->body = ""; 
    42         $this->cc = ""; 
    43         $this->bcc = ""; 
    44         $this->replay_to = ""; 
    45         $this->return_path = ""; 
     39        $this->to = ''; 
     40        $this->subject = ''; 
     41        $this->body = ''; 
     42        $this->cc = ''; 
     43        $this->bcc = ''; 
     44        $this->replay_to = ''; 
     45        $this->return_path = ''; 
    4646        $this->backend = MAIL_BACKEND; 
    4747        $this->host = SMTP_HOST; 
     
    6060 
    6161    // 宛先の設定 
    62     function setTo($to, $to_name = "") { 
    63         if ($to != "") { 
     62    function setTo($to, $to_name = '') { 
     63        if ($to != '') { 
    6464            $this->to = $this->getNameAddress($to_name, $to); 
    6565            $this->setRecip('To', $to); 
     
    6868 
    6969    // 送信元の設定 
    70     function setFrom($from, $from_name = "") { 
     70    function setFrom($from, $from_name = '') { 
    7171        $this->from = $this->getNameAddress($from_name, $from); 
    7272    } 
    7373 
    7474    // CCの設定 
    75     function setCc($cc, $cc_name = "") { 
    76         if ($cc != "") { 
     75    function setCc($cc, $cc_name = '') { 
     76        if ($cc != '') { 
    7777            $this->cc = $this->getNameAddress($cc_name, $cc); 
    7878            $this->setRecip('Cc', $cc); 
     
    8282    // BCCの設定 
    8383    function setBCc($bcc) { 
    84         if ($bcc != "") { 
     84        if ($bcc != '') { 
    8585            $this->bcc = $bcc; 
    8686            $this->setRecip('Bcc', $bcc); 
     
    9090    // Reply-Toの設定 
    9191    function setReplyTo($reply_to) { 
    92         if ($reply_to != "") { 
     92        if ($reply_to != '') { 
    9393            $this->reply_to = $reply_to; 
    9494        } 
     
    138138    // 名前<メールアドレス>の形式を生成 
    139139    function getNameAddress($name, $mail_address) { 
    140             if ($name != "") { 
     140            if ($name != '') { 
    141141                // 制御文字を変換する。 
    142142                $_name = $name; 
    143                 $_name = ereg_replace("<","<", $_name); 
    144                 $_name = ereg_replace(">",">", $_name); 
     143                $_name = ereg_replace('<','<', $_name); 
     144                $_name = ereg_replace('>','>', $_name); 
    145145                $_name = mb_encode_mimeheader($_name, 'JIS', 'B', "\n"); 
    146146                $name_address = "\"". $_name . "\"<" . $mail_address . ">"; 
     
    151151    } 
    152152 
    153     function setItem($to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="") { 
     153    function setItem($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to="", $bcc="", $cc ="") { 
    154154        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    155155    } 
    156156 
    157     function setItemHtml($to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="") { 
     157    function setItemHtml($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to="", $bcc="", $cc ="") { 
    158158        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    159159    } 
     
    171171         $bcc           -> ブラインドカーボンコピー 
    172172    */ 
    173     function setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="") { 
     173    function setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to="", $bcc="", $cc ="") { 
    174174        // 宛先設定 
    175175        $this->setTo($to); 
     
    188188 
    189189        // Errors-Toは、ほとんどのSMTPで無視され、Return-Pathが優先されるためReturn_Pathに設定する。 
    190         if ($errors_to != "") { 
     190        if ($errors_to != '') { 
    191191            $this->return_path = $errors_to; 
    192         } else if ($return_path != "") { 
     192        } else if ($return_path != '') { 
    193193            $this->return_path = $return_path; 
    194194        } else { 
     
    205205        $arrHeader['From'] = $this->from; 
    206206        $arrHeader['Return-Path'] = $this->return_path; 
    207         if ($this->reply_to != "") { 
     207        if ($this->reply_to != '') { 
    208208            $arrHeader['Reply-To'] = $this->reply_to; 
    209209        } 
    210         if ($this->cc != "") { 
     210        if ($this->cc != '') { 
    211211            $arrHeader['Cc'] = $this->cc; 
    212212        } 
    213         if ($this->bcc != "") { 
     213        if ($this->bcc != '') { 
    214214            $arrHeader['Bcc'] = $this->bcc; 
    215215        } 
    216         $arrHeader['Date'] = date("D, j M Y H:i:s O"); 
     216        $arrHeader['Date'] = date('D, j M Y H:i:s O'); 
    217217        return $arrHeader; 
    218218    } 
     
    230230        $arrHeader = $this->getBaseHeader(); 
    231231        $arrHeader['Content-Type'] = "text/html; charset=\"ISO-2022-JP\""; 
    232         $arrHeader['Content-Transfer-Encoding'] = "ISO-2022-JP"; 
     232        $arrHeader['Content-Transfer-Encoding'] = 'ISO-2022-JP'; 
    233233        return $arrHeader; 
    234234    } 
Note: See TracChangeset for help on using the changeset viewer.