Yii2-Sms sends free messages using Swift Mail
This document will guide you through the process of installing Yii2-Sms using composer.
$ php composer.phar require abhi1693/yii2-sms 2.0.0
Or Add Yii2-Sms to the require section of your composer.json file:
{
"require": {
"abhi1693/yii2-sms": "2.0.0"
}
}
And run following command to download extension using composer:
$ php composer.phar update
- AT&T
- Boost Mobile
- Cingular
- Metro PCS
- Nextel
- Sprint
- T-Mobile
- Verizon
- Virgin Mobile
$sms = new Sms();
$sms->transportType = 'php'; // php/smtp
$sms->transportOptions = [
'host' => 'smtp.gmail.com', // Other domains can also be used
'username' => 'your@gmail.com',
'password' => '******',
'port' => '465',
'encryption' => 'ssl'
];
$carrier = "T-Mobile";
$number = "0123456789";
$subject = "Subject";
$message = "Message";
$sms->send($carrier, $number, $subject, $message);
Contributing instructions are located in CONTRIBUTING.md file.
Yii2-sms is released under the MIT License. See the bundled LICENSE for details.