throw new UnsupportedMessageTypeException(__CLASS__, SmsMessage::
class,
$message);
} $endpoint =
sprintf('http://%s/api',
$this->
getEndpoint());
$response =
$this->client->
request('POST',
$endpoint,
[ 'query' =>
[ 'action' => 'sendmessage',
'username' =>
$this->username,
'password' =>
$this->password,
'recipient' =>
$message->
getPhone(),
'messagetype' => 'SMS:TEXT',
'originator' =>
$message->
getFrom() ?:
$this->sender,
'messagedata' =>
$message->
getSubject(),
],
]);
try { $statusCode =
$response->
getStatusCode();
} catch (TransportExceptionInterface
$e) { throw new TransportException('Could not reach the remote KazInfoTeh server.',
$response, 0,
$e);
} try {