Changeset 17085 for branches/version-2


Ignore:
Timestamp:
2008/02/27 17:01:40 (18 years ago)
Author:
satou
Message:

#234 メールがCc,Bcc宛に配信されない不具合を改修

File:
1 edited

Legend:

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

    r17055 r17085  
    4343    // コンストラクタ 
    4444    function SC_SendMail() { 
     45        $this->arrRecip = array(); 
    4546        $this->to = ""; 
    4647        $this->subject = ""; 
     
    6263    } 
    6364 
     65    // 送信先の設定 
     66    function setRecip($recipient) { 
     67        $this->arrRecip[] = $recipient; 
     68    } 
     69     
    6470    // 宛先の設定 
    6571    function setTo($to, $to_name = "") { 
    66         $this->to = $this->getNameAddress($to_name, $to); 
     72        if($to != "") { 
     73            $this->to = $this->getNameAddress($to_name, $to); 
     74            $this->setRecip($to); 
     75        } 
    6776    } 
    6877 
     
    7685        if($cc != "") { 
    7786            $this->cc = $this->getNameAddress($cc_name, $cc); 
     87            $this->setRecip($cc); 
    7888        } 
    7989    } 
     
    8393        if($bcc != "") { 
    8494            $this->bcc = $bcc; 
     95            $this->setRecip($bcc); 
    8596        } 
    8697    } 
     
    150161    } 
    151162 
    152     function setItem( $to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="" ) { 
     163    function setItem($to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="") { 
    153164        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    154165    } 
    155166 
    156     function setItemHtml( $to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="" ) { 
     167    function setItemHtml($to, $subject, $body, $fromaddress, $from_name, $reply_to="", $return_path="", $errors_to="", $bcc="", $cc ="") { 
    157168        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    158169    } 
     
    237248        $header = $this->getTEXTHeader(); 
    238249        // メール送信 
    239         $result = $this->objMail->send($this->to, $header, $this->body); 
     250        $result = $this->objMail->send($this->arrRecip, $header, $this->body); 
    240251        if (PEAR::isError($result)) { 
    241252            GC_Utils_Ex::gfPrintLog($result->getMessage()); 
     
    250261        $header = $this->getHTMLHeader(); 
    251262        // メール送信 
    252         $result = $this->objMail->send($this->to, $header, $this->body); 
     263        $result = $this->objMail->send($this->arrRecip, $header, $this->body); 
    253264        if (PEAR::isError($result)) { 
    254265            GC_Utils_Ex::gfPrintLog($result->getMessage()); 
Note: See TracChangeset for help on using the changeset viewer.