Skip to content

kartik-v/yii2-sms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2-Sms

Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License

Yii2-Sms sends free messages using Swift Mail

Documentation

Installation

This document will guide you through the process of installing Yii2-Sms using composer. Installation is a quick and easy two-step process.

Step 1: Download using composer

Add Yii2-Sms to the require section of your composer.json file:

{
    "require": {
        "abhi1693/yii2-sms": "1.0.0"
    }
}

And run following command to download extension using composer:

$ php composer.phar update

Step 2: Configure your application

$config = [
    ...
    'components' => [
        ...
        'sms' => [
            'class'             => 'abhimanyu\sms\components\Sms' // Class (Required)
            'transportType'     => 'smtp'                         // smtp/php (Optional)
            'transportOptions'  => [                              // (Required)
                'host'       => 'smtp.gmail.com'                  // Other domains can also be used
                'username'   => 'your@gmail.com',
                'password'   => '******',
                'port'       => '465',
                'encryption' => 'ssl'
            ]
        ]
    ]
]

Basic Usage

Valid Carriers

  • AT&T
  • Boost Mobile
  • Cingular
  • Metro PCS
  • Nextel
  • Sprint
  • T-Mobile
  • Verizon
  • Virgin Mobile

Usage

$sms = new Sms();

$carrier = "T-Mobile";
$number = "0123456789";
$subject = "Subject";
$message = "Message";
$sms->send($carrier, $number, $subject, $message);

How to contribute?

Contributing instructions are located in CONTRIBUTING.md file.

License

Yii2-sms is released under the MIT License. See the bundled LICENSE for details.

About

Send Free Sms for Yii2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%