Ignore:
Timestamp:
2010/03/11 10:35:11 (14 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/class/helper/SC_Helper_Mail.php

    r18177 r18609  
    4545 
    4646    /* DBに登録されたテンプレートメールの送信 */ 
    47     function sfSendTemplateMail($to, $to_name, $template_id, &$objPage) { 
     47    function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = "", $from_name = "", $reply_to = "") { 
    4848 
    4949        $objQuery = new SC_Query(); 
     
    6565        // メール送信処理 
    6666        $objSendMail = new SC_SendMail_Ex(); 
    67         $from = $arrInfo['email03']; 
    68         $error = $arrInfo['email04']; 
    69         $tosubject = $tmp_subject; 
    70         $objSendMail->setItem('', $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error); 
     67        if ($from_address == "") $from_address = $arrInfo['email03']; 
     68        if ($from_name == "") $from_name = $arrInfo['shop_name']; 
     69        if ($reply_to == "") $reply_to = $arrInfo['email03']; 
     70        $error = $arrInfo['email04']; 
     71        $tosubject = $this->sfMakeSubject($tmp_subject); 
     72         
     73        $objSendMail->setItem('', $tosubject, $body, $from_address, $from_name, $reply_to, $error, $error); 
    7174        $objSendMail->setTo($to, $to_name); 
    7275        $objSendMail->sendMail();    // メール送信 
     
    143146        $from = $arrInfo['email03']; 
    144147        $error = $arrInfo['email04']; 
    145  
    146         $tosubject = $this->sfMakeSubject($objQuery, $objMailView, 
    147                                              $objPage, $tmp_subject); 
     148        $tosubject = $this->sfMakeSubject($tmp_subject); 
    148149 
    149150        $objSendMail->setItem('', $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 
     
    162163 
    163164    // テンプレートを使用したメールの送信 
    164     function sfSendTplMail($to, $subject, $tplpath, &$objPage) { 
     165    function sfSendTplMail($to, $tmp_subject, $tplpath, &$objPage) { 
    165166        $objMailView = new SC_SiteView(); 
    166167        $objSiteInfo = new SC_SiteInfo(); 
     
    173174        // メール送信処理 
    174175        $objSendMail = new SC_SendMail_Ex(); 
    175         $to = mb_encode_mimeheader($to); 
    176176        $bcc = $arrInfo['email01']; 
    177177        $from = $arrInfo['email03']; 
    178178        $error = $arrInfo['email04']; 
    179         $objSendMail->setItem($to, $subject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 
     179        $tosubject = $this->sfMakeSubject($tmp_subject); 
     180         
     181        $objSendMail->setItem($to, $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 
    180182        $objSendMail->sendMail(); 
    181183    } 
    182184 
    183185    // 通常のメール送信 
    184     function sfSendMail($to, $subject, $body) { 
     186    function sfSendMail($to, $tmp_subject, $body) { 
    185187        $objSiteInfo = new SC_SiteInfo(); 
    186188        $arrInfo = $objSiteInfo->data; 
     
    190192        $from = $arrInfo['email03']; 
    191193        $error = $arrInfo['email04']; 
    192         $objSendMail->setItem($to, $subject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 
     194        $tosubject = $this->sfMakeSubject($tmp_subject); 
     195         
     196        $objSendMail->setItem($to, $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 
    193197        $objSendMail->sendMail(); 
    194198    } 
    195199 
    196200    //件名にテンプレートを用いる 
    197     function sfMakeSubject(&$objQuery, &$objMailView, &$objPage, $subject){ 
    198  
     201    function sfMakeSubject($subject) { 
     202        $objQuery = new SC_Query(); 
     203        $objMailView = new SC_SiteView(); 
     204        $objTplAssign = new stdClass; 
     205         
    199206        $arrInfo = $objQuery->select("*","dtb_baseinfo"); 
    200207        $arrInfo = $arrInfo[0]; 
    201         $objPage->tpl_shopname=$arrInfo['shop_name']; 
    202         $objPage->tpl_infoemail=$subject; 
    203         $objMailView->assignobj($objPage); 
    204         $mailtitle = $objMailView->fetch('mail_templates/mail_title.tpl'); 
    205         $ret = $mailtitle.$subject; 
    206         return $ret; 
     208        $objTplAssign->tpl_shopname=$arrInfo['shop_name']; 
     209        $objTplAssign->tpl_infoemail=$subject; // 従来互換 
     210        $objTplAssign->tpl_mailtitle=$subject; 
     211        $objMailView->assignobj($objTplAssign); 
     212        $subject = $objMailView->fetch('mail_templates/mail_title.tpl'); 
     213        return $subject; 
    207214    } 
    208215 
Note: See TracChangeset for help on using the changeset viewer.