Exemplo n.º 1
0
 public function api_send($shortcode)
 {
     $this->_writeLog("Message->Send() called...");
     // General concept here is simple... load up a message and all of the
     // recipients based simply on the message id from the queue
     if ($this->id && $this->body) {
         $this->_writeLog("All message components checked");
         $sender = new Application_Model_Smsoutbound($this);
         $this->_writeLog("Sender built");
         if (($return = $sender->api_send($shortcode)) === false) {
             $this->error = $sender->error;
         }
         $this->_writeLog("Sender->Send() called from the message...");
         return $return;
     }
     $this->_writeLog('Missing required components of the message: ' . serialize($this));
     $this->error = 'Missing required components of the message: ' . serialize($this);
     return false;
 }