Ignore:
Timestamp:
2010/07/20 13:25:33 (16 years ago)
Author:
kajiwara
Message:

EC-CUBE Ver2.4.4 分コミット。詳細はこちら( http://www.ec-cube.net/release/detail.php?release_id=223

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/class/SC_SendMail.php

    r17491 r18758  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    261261    } 
    262262 
    263     //  TXTメール送信を実行する 
     263    /** 
     264     * TXTメール送信を実行する. 
     265     * 
     266     * 設定された情報を利用して, メールを送信する. 
     267     * メールの宛先に Cc や Bcc が設定されていた場合は, 宛先ごとに複数回送信を行う. 
     268     * 
     269     * - getRecip() 関数の返り値が配列の場合は, 返り値のメールアドレスごとに, 
     270     *   PEAR::Mail::send() 関数を実行する. 
     271     * - getRecip() 関数の返り値が string の場合は, 返り値のメールアドレスを 
     272     *   RCPT TO: に設定し, PEAR::Mail::send() 関数を実行する. 
     273     * 
     274     * @return void 
     275     */ 
    264276    function sendMail() { 
    265277        $header = $this->getTEXTHeader(); 
     278        $recip = $this->getRecip(); 
     279 
    266280        // メール送信 
    267         $result = $this->objMail->send($this->getRecip(), $header, $this->body); 
    268         if (PEAR::isError($result)) { 
    269             GC_Utils_Ex::gfPrintLog($result->getMessage()); 
    270             GC_Utils_Ex::gfDebugLog($header); 
    271             return false; 
    272         } 
    273         return true; 
     281        if (is_array($recip)) { 
     282            foreach ($recip as $rcpt_to) { 
     283                $results[] = $this->objMail->send($rcpt_to, $header, $this->body); 
     284            } 
     285        } else { 
     286            $results[] = $this->objMail->send($recip, $header, $this->body); 
     287        } 
     288 
     289        $ret = true; 
     290        foreach ($results as $result) { 
     291            if (PEAR::isError($result)) { 
     292                GC_Utils_Ex::gfPrintLog($result->getMessage()); 
     293                GC_Utils_Ex::gfDebugLog($header); 
     294                $ret = false; 
     295            } 
     296        } 
     297        return $ret; 
    274298    } 
    275299 
Note: See TracChangeset for help on using the changeset viewer.