Yii2 Smser Component
Smser is a component based sms solution for Yii2.It is released under the BSD 3-Clause license., (*1)
, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist emnabs/yii2-smser "*"
or add, (*5)
"emnabs/yii2-smser": "*"
to the require section of your composer.json., (*6)
Usage
To use this extension, you have to configure the Connection class in your application configuration:, (*7)
//configure component:
return [
//....
'components' => [
//....
'smser' => [
'class' => 'emhome\smser\Smser',
],
//....
]
];
Usage example, (*8)
Yii::$app->smser->compose()
->setMobile(['手机号码'])
->setContent('短信内容')
->send();
包含接口
License
yii2-smser is released under the BSD 3-Clause
License. See the bundled LICENSE.md
for details., (*9)