albertborsos/yii2-clickatell

Yii2 extension implements Clickatell SMS sender

v0.4.1 2016-03-19 10:34 UTC

This package is auto-updated.

Last update: 2024-11-08 07:42:20 UTC


README

Yii2 extension implements Clickatell SMS sender

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist "albertborsos/yii2-clickatell:0.4.*"

or add

"albertborsos/yii2-clickatell": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by in config:

'components' => array(
    ...
    'clickatell' => array(
        'class' => 'albertborsos\clickatell\ClickatellHttp',
        'username' => 'your clickatell user',
        'password' => 'your clickatell password',
        'apiId' => 'your clickatell api id',
        'from' => '+36xxxxxxxx' // optional parameter,
        'mo' => 1 // optional parameter
    ),
    ...
);

Then:

Yii::$app->clickatell->sendMessage('+36xxxxxxxxx', 'Hello world!');