1. Go to this page and download the library: Download abhi1693/yii2-sms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abhi1693 / yii2-sms example snippets
$ php composer.phar
{
" "abhi1693/yii2-sms": "2.0.0"
}
}
$ php composer.phar update
$sms = new Sms();
$sms->transportType = 'php'; // php/smtp
$sms->transportOptions = [
'host' => 'smtp.gmail.com', // Other domains can also be used
'username' => '[email protected]',
'password' => '******',
'port' => '465',
'encryption' => 'ssl'
];
$carrier = "T-Mobile";
$number = "0123456789";
$subject = "Subject";
$message = "Message";
$sms->send($carrier, $number, $subject, $message);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.