Extension for sending SMS
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mrssoft/yii2-sms "*"
or add
"mrssoft/yii2-sms": "*"
to the require section of your composer.json
file.
Configuration:
'components' => [
...
'sms' => [
'class' => 'mrssoft\sms\drivers\tele2\Sms',
'login' => '',
'password' => '******',
'naming' => 'BRAND',
],
...
'sms' => [
'class' => 'mrssoft\sms\drivers\mts\Sms',
'token' => '',
'naming' => 'BRAND',
],
....
]
Usage:
Yii::$app->sms->sendMessage('Message', '79830000000');
Yii::$app->sms->sendMessages('Message', ['79830000000', '79830000001']);