Skip to content
/ sms Public

Package for sending SMS via service gateways

License

Notifications You must be signed in to change notification settings

ensostudio/sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base package for sending SMS by HTTP via service gateways.

Gateways

Example

Use GuzzleHttp to send request:

$gateway = new \EnsoStudio\Sms\Gateway\SmscGateway(
    ['apiKey' => '...'],
    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()
}

About

Package for sending SMS via service gateways

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages