Changeset 16939


Ignore:
Timestamp:
2007/12/20 14:03:54 (16 years ago)
Author:
naka
Message:

メルマガ配信をspeedmailに対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/admin/mail/LC_Page_Admin_Mail_Sendmail.php

    r16582 r16939  
    2525require_once(CLASS_PATH . "pages/LC_Page.php"); 
    2626 
    27 // SC_SendMailの拡張 
    28 if(file_exists(MODULE2_PATH . "module_inc.php")) { 
    29     require_once(MODULE2_PATH . "module_inc.php"); 
    30 } else { 
    31     require_once(CLASS_EX_PATH . "SC_SendMail_Ex.php"); 
    32 } 
    33  
    3427/** 
    3528 * メール配信履歴 のページクラス. 
     
    4033 */ 
    4134class LC_Page_Admin_Mail_Sendmail extends LC_Page { 
    42  
     35     
     36    var $objMail; 
    4337    // }}} 
    4438    // {{{ functions 
     
    5044     */ 
    5145    function init() { 
     46         // SC_SendMailの拡張 
     47        if(file_exists(MODULE_PATH . "mdl_speedmail/SC_SpeedMail.php")) { 
     48            require_once(MODULE_PATH . "mdl_speedmail/SC_SpeedMail.php"); 
     49            // SpeedMail対応 
     50            $this->objMail = new SC_SpeedMail(); 
     51        } else { 
     52            $this->objMail = new SC_SendMail_Ex(); 
     53        } 
     54         
    5255        parent::init(); 
    5356    } 
     
    106109        //---- 送信結果フラグ用SQL 
    107110        $sql_flag ="UPDATE dtb_send_customer SET send_flag = ? WHERE send_id = ? AND customer_id = ?"; 
    108         $objMail = new SC_SendMail_Ex(); 
    109111 
    110112        //---- メール生成と送信 
     
    126128                $mailBody = ereg_replace( "{name}", $customerName ,  $mail_data[$i][0]["body"] ); 
    127129 
    128                 $objMail->setItem( 
     130                $this->objMail->setItem( 
    129131                                                $list_data[$i][$j]["email"] 
    130132                                               ,$subjectBody 
     
    139141                //-- テキストメール配信の場合 
    140142                if( $mail_data[$i][0]["mail_method"] == 2 ) { 
    141                     $sendResut = $objMail->sendMail(); 
     143                    $sendResut = $this->objMail->sendMail(); 
    142144                //--  HTMLメール配信の場合 
    143145                } else { 
    144                     $sendResut = $objMail->sendHtmlMail(); 
     146                    $sendResut = $this->objMail->sendHtmlMail(); 
    145147                } 
    146148 
     
    165167            $compSubject =  date("Y年m月d日H時i分" . "  下記メールの配信が完了しました。" ); 
    166168            // 管理者宛に変更 
    167             $objMail->setTo($objSite->data["email03"]); 
    168             $objMail->setSubject($compSubject); 
     169            $this->objMail->setTo($objSite->data["email03"]); 
     170            $this->objMail->setSubject($compSubject); 
    169171 
    170172            //-- テキストメール配信の場合 
    171173            if( $mail_data[$i][0]["mail_method"] == 2 ) { 
    172                 $sendResut = $objMail->sendMail(); 
     174                $sendResut = $this->objMail->sendMail(); 
    173175            //--  HTMLメール配信の場合 
    174176            } else { 
    175                 $sendResut = $objMail->sendHtmlMail(); 
     177                $sendResut = $this->objMail->sendHtmlMail(); 
    176178            } 
    177179        } 
Note: See TracChangeset for help on using the changeset viewer.