Index: /branches/version-2/data/class/SC_SendMail.php
===================================================================
--- /branches/version-2/data/class/SC_SendMail.php	(revision 17086)
+++ /branches/version-2/data/class/SC_SendMail.php	(revision 17092)
@@ -64,6 +64,6 @@
 
     // 送信先の設定
-    function setRecip($recipient) {
-        $this->arrRecip[] = $recipient;
+    function setRecip($key, $recipient) {
+        $this->arrRecip[$key] = $recipient;
     }
     
@@ -72,5 +72,5 @@
         if($to != "") {
             $this->to = $this->getNameAddress($to_name, $to);
-            $this->setRecip($to);
+            $this->setRecip("To", $to);
         }
     }
@@ -85,5 +85,5 @@
         if($cc != "") {
             $this->cc = $this->getNameAddress($cc_name, $cc);
-            $this->setRecip($cc);
+            $this->setRecip("Cc", $cc);
         }
     }
@@ -93,5 +93,5 @@
         if($bcc != "") {
             $this->bcc = $bcc;
-            $this->setRecip($bcc);
+            $this->setRecip("Bcc", $bcc);
         }
     }
@@ -243,4 +243,18 @@
         return $arrHeader;
     }
+    
+    // 送信先を返す
+    function getRecip() {
+        switch ($this->backend) {
+        case "mail":
+            return $this->to;
+            break;
+        case "sendmail":
+        case "smtp":
+        default:
+            return $this->arrRecip;
+            break;
+        }
+    }
 
     //  TXTメール送信を実行する
@@ -248,5 +262,5 @@
         $header = $this->getTEXTHeader();
         // メール送信
-        $result = $this->objMail->send($this->arrRecip, $header, $this->body);
+        $result = $this->objMail->send($this->getRecip(), $header, $this->body);
         if (PEAR::isError($result)) {
             GC_Utils_Ex::gfPrintLog($result->getMessage());
@@ -261,5 +275,5 @@
         $header = $this->getHTMLHeader();
         // メール送信
-        $result = $this->objMail->send($this->arrRecip, $header, $this->body);
+        $result = $this->objMail->send($this->getRecip(), $header, $this->body);
         if (PEAR::isError($result)) {
             GC_Utils_Ex::gfPrintLog($result->getMessage());
@@ -279,5 +293,5 @@
         switch ($backend) {
         case "mail":
-			$arrParams = array();
+            $arrParams = array();
             break;
         case "sendmail":
@@ -292,4 +306,5 @@
                                'port' => $this->port
                                );
+            break;
         }
         return $arrParams;
