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