/** * 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()); }
/** * 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(); }
/** * 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()]); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); }
/** * 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(); }