net-tools/sms
Composer 安装命令:
composer require net-tools/sms
包简介
Composer library for sending SMS through several gateways
README 文档
README
Root composer library to send SMS through an host such as AWS SNS or OVH
Setup instructions
To install net-tools/sms package, just require it through composer : require net-tools/sms:^1.0.0.
Don't forget to append the real implementation : require net-tools/sms-aws:^1.0.0 or require net-tools/sms-ovh:^1.0.0
How to use ?
This project makes it possible to send SMS through AWS SNS or OVH provider
// create the $snsclient ; please refer to AWS API reference to see how to create the client // creating config ; actual parameters vary along providers $config = new \Nettools\Core\Misc\ObjectConfig((object)['sanitizeSenderId' => true]); // create the api gateway $gw = new Aws\ApiGateway($snsclient, $config); // send a sms to several recipients, and this is a transactionnal message (last parameter set to True) $gw->send('Appointment confirmed !', 'CLINIC', ['+XXYYYYYYYYY', '+XXZZZZZZZZZZ'], true); // if there are many recipients, call bulkSend insted, with same parameters, as it's more optimized
The APIs supported are : AWS and OVH.
PHPUnit
To test with PHPUnit, point the -c configuration option to the /phpunit.xml configuration file.
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-04