Changeset 17092


Ignore:
Timestamp:
2008/02/28 12:00:48 (16 years ago)
Author:
satou
Message:

#234 メールバックエンドによるメール配信の不具合を修正

File:
1 edited

Legend:

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

    r17086 r17092  
    6464 
    6565    // 送信先の設定 
    66     function setRecip($recipient) { 
    67         $this->arrRecip[] = $recipient; 
     66    function setRecip($key, $recipient) { 
     67        $this->arrRecip[$key] = $recipient; 
    6868    } 
    6969     
     
    7272        if($to != "") { 
    7373            $this->to = $this->getNameAddress($to_name, $to); 
    74             $this->setRecip($to); 
     74            $this->setRecip("To", $to); 
    7575        } 
    7676    } 
     
    8585        if($cc != "") { 
    8686            $this->cc = $this->getNameAddress($cc_name, $cc); 
    87             $this->setRecip($cc); 
     87            $this->setRecip("Cc", $cc); 
    8888        } 
    8989    } 
     
    9393        if($bcc != "") { 
    9494            $this->bcc = $bcc; 
    95             $this->setRecip($bcc); 
     95            $this->setRecip("Bcc", $bcc); 
    9696        } 
    9797    } 
     
    243243        return $arrHeader; 
    244244    } 
     245     
     246    // 送信先を返す 
     247    function getRecip() { 
     248        switch ($this->backend) { 
     249        case "mail": 
     250            return $this->to; 
     251            break; 
     252        case "sendmail": 
     253        case "smtp": 
     254        default: 
     255            return $this->arrRecip; 
     256            break; 
     257        } 
     258    } 
    245259 
    246260    //  TXTメール送信を実行する 
     
    248262        $header = $this->getTEXTHeader(); 
    249263        // メール送信 
    250         $result = $this->objMail->send($this->arrRecip, $header, $this->body); 
     264        $result = $this->objMail->send($this->getRecip(), $header, $this->body); 
    251265        if (PEAR::isError($result)) { 
    252266            GC_Utils_Ex::gfPrintLog($result->getMessage()); 
     
    261275        $header = $this->getHTMLHeader(); 
    262276        // メール送信 
    263         $result = $this->objMail->send($this->arrRecip, $header, $this->body); 
     277        $result = $this->objMail->send($this->getRecip(), $header, $this->body); 
    264278        if (PEAR::isError($result)) { 
    265279            GC_Utils_Ex::gfPrintLog($result->getMessage()); 
     
    279293        switch ($backend) { 
    280294        case "mail": 
    281             $arrParams = array(); 
     295            $arrParams = array(); 
    282296            break; 
    283297        case "sendmail": 
     
    292306                               'port' => $this->port 
    293307                               ); 
     308            break; 
    294309        } 
    295310        return $arrParams; 
Note: See TracChangeset for help on using the changeset viewer.