Ejemplo n.º 1
0
 /**
  * Builds the email address of a number.
  *
  * @param array $number The number and carrier to look up.
  * @return string
  */
 protected function buildEmail($number)
 {
     if (!$number['carrier']) {
         throw new \InvalidArgumentException('A carrier must be specified if using the E-Mail Driver.');
     }
     return $number['number'] . '@' . $this->lookupGateway($number['carrier'], $this->outgoingMessage->isMMS());
 }
Ejemplo n.º 2
0
 /**
  * Sends a SMS message.
  *
  * @param \Laggards\SMS\OutgoingMessage $message
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $composedMessage = $message->composeMessage();
     $data = ['PhoneNumbers' => $message->getTo(), 'Message' => $composedMessage];
     $this->buildCall('/sending/messages');
     $this->buildBody($data);
     $this->postRequest();
 }
Ejemplo n.º 3
0
 /**
  * Sends a SMS message.
  *
  * @param \Laggards\SMS\OutgoingMessage $message
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $from = $message->getFrom();
     $composeMessage = $message->composeMessage();
     foreach ($message->getTo() as $to) {
         $this->twilio->account->messages->create(['To' => $to, 'From' => $from, 'Body' => $composeMessage, 'MediaUrl' => $message->getAttachImages()]);
     }
 }
Ejemplo n.º 4
0
 /**
  * Sends a SMS message.
  *
  * @param OutgoingMessage $message The SMS message instance.
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $composeMessage = $message->composeMessage();
     foreach ($message->getTo() as $to) {
         $data = ['msisdn' => $to, 'message' => $composeMessage];
         $this->buildBody($data);
         $this->getRequest();
     }
 }
Ejemplo n.º 5
0
 /**
  * Sends a SMS message.
  *
  * @param \Laggards\SMS\OutgoingMessage $message
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $composeMessage = $message->composeMessage();
     foreach ($message->getTo() as $to) {
         $data = ['mobile' => $to, 'content' => urlencode($composeMessage), 'stime' => '', 'type' => 'pt', 'extno' => ''];
         $this->buildBody($data);
         $this->getRequest();
     }
 }
Ejemplo n.º 6
0
 /**
  * Sends a SMS message.
  *
  * @param \Laggards\SMS\OutgoingMessage $message
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $composeMessage = $message->composeMessage();
     //Convert to callfire format.
     $numbers = implode(",", $message->getTo());
     $data = ['To' => $numbers, 'Message' => $composeMessage];
     $this->buildCall('/text');
     $this->buildBody($data);
     $this->postRequest();
 }
Ejemplo n.º 7
0
 /**
  * Sends a SMS message.
  *
  * @param \Laggards\SMS\OutgoingMessage $message
  * @return void
  */
 public function send(OutgoingMessage $message)
 {
     $from = $message->getFrom();
     $composeMessage = $message->composeMessage();
     //Convert to callfire format.
     $numbers = implode(",", $message->getTo());
     $data = ['from' => $from, 'to' => $numbers, 'text' => $composeMessage, 'api_key' => $this->apiKey, 'api_secret' => $this->apiSecret];
     $this->buildCall('/sms/json');
     $this->buildBody($data);
     return $this->postRequest();
 }