yii2-sms Send Free Sms for Yii2

Yii2-Sms

  1. Installation
  2. Basic Usage

Latest Stable Version Total Downloads

Yii2-Sms sends free messages using Swift Mail

Documentation

Installation

This document will guide you through the process of installing Yii2-Sms using composer.

Download using composer

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

Basic Usage

Valid Carriers
  • AT&T
  • Boost Mobile
  • Cingular
  • Metro PCS
  • Nextel
  • Sprint
  • T-Mobile
  • Verizon
  • Virgin Mobile
Usage
$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);
1 0
7 followers
0 downloads
Yii Version: 2.0
License: MIT
Category: Others
Developed by: Abhimanyu Saharan
Created on: Feb 25, 2015
Last updated: 9 years ago

Related Extensions