ensostudio / sms-smsru
smsc.ru gateway for ensostudio/sms
1.0.0
2025-04-21 11:46 UTC
Requires
- ensostudio/sms: ^1.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.9.0
- guzzlehttp/psr7: ^2.7.0
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2025-04-21 11:50:33 UTC
README
Send SMS via HTTP gateway sms.ru
Example
Use GuzzleHttp to send request:
$gateway = new \EnsoStudio\Sms\Gateway\SmsruGateway( ['apiId' => '...'], new \GuzzleHttp\Client(), new \GuzzleHttp\Psr7\HttpFactory() ); $result = $gateway->sendSms('Test message', [\EnsoStudio\Sms\PhoneUtils::sanitizeNumber('+7 905 710-71-71')]); if (!$result->isSuccess()) { // error handler for $result->getErrors() }