fighcell/yii2-sms
Composer 安装命令:
composer require fighcell/yii2-sms
包简介
Component for sending sms
README 文档
README
This is a component used to send sms, mimic the yii mailer component behaviour
Installation
via composer.json
composer require fighcell/yii2-sms
Usage
Add the component to your main.php.
[
'components' => [
'sms' => [
'class' => \fighcell\sms\providers\sendsmsro\SendSmsRo::class,
'viewPath' => '@common/sms',
'messageConfig' => [
'class' => \fighcell\sms\providers\sendsmsro\Message::class,
'from' => '0040766123456', // From number to send from
],
// send all sms to a file by default.
'useFileTransport' => true, // false for real sending
'username' => '{USERNAME}',
'password' => '{PASSWORD}',
],
]
];
Use as follow:
Yii::$app->sms->compose()
->setTo('+40766123456')
->setMessage("Hey Receiver this is a message sent with SendSms.ro!\n\nThanks!Sender")
->send();
This is made using this yii2-extension:
https://www.yiiframework.com/extension/wadeshuler/yii2-sms
02-08-2022 - This extension was removed from Github, so we added the code under the base folder
More details following the link
Extend
Just add your implementation into a new folder in the providers folder. Make sure you extend the AbstractBaseMessage and AbstractSms classes.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-09-22