PHPackages                             d4rkstar/yii2-kannel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. d4rkstar/yii2-kannel

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

d4rkstar/yii2-kannel
====================

Yii 2 Kannel Http SMS

2813PHP

Since Mar 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/d4rkstar/yii2-kannel)[ Packagist](https://packagist.org/packages/d4rkstar/yii2-kannel)[ RSS](/packages/d4rkstar-yii2-kannel/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-kannel
-----------

[](#yii2-kannel)

This widget will let you send SMS through the HTTP interface exposed by Kannel ().

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

### Install

[](#install)

Either run

```
$ php composer.phar require d4rkstar/yii2-kannel "dev-master"

```

or add

```
"d4rkstar/yii2-kannel": "dev-master"

```

to the `require` section of your `composer.json` file.

### Sample Usage

[](#sample-usage)

In the section `components` of your `app/config/web.php`, add:

```
'components' => [
    ...
    'kannel' => require(__DIR__ . '/kannel.php'),
]

```

Now, add a configuration file named `app/config/kannel.php`, and add:

```

```

Now, anywhere in your application, you can send an SMS:

```

```

### Return Values

[](#return-values)

codecontentmeaning2020: Accepted for deliveryThe message has been accepted and is delivered onward to a SMSC driver. Note that this status does not ensure that the intended recipient receives the message.2023: Queued for later deliveryThe bearerbox accepted and stored the message, but there was temporarily no SMSC driver to accept the message so it was queued. However, it should be delivered later on.4xx(varies)There was something wrong in the request or Kannel was so configured that the message cannot be in any circumstances delivered. Check the request and Kannel configuration.503Temporal failure, try again later.There was temporal failure in Kannel. Try again later.Delivery Reports
----------------

[](#delivery-reports)

If you set dlrMask and dlrUrl, the HTTP request will ask Kannel to report the delivery status for the SMS. Delivery reports are sent to your application through a web callback URL: based on the type of report, Kannel will call the URL you specified in dlrUrl. So, if the URL carry in an ID parameter, the callback will carry this ID too plus the type of delivery report id.

Delivery reports are:

constantvaluemeaningHttpSms::DLR\_DELIVERY\_SUCCESS1Message gets successfully delivered.HttpSms::DLR\_DELIVERY\_FAILURE2Message gets accepted by the SMSC but the phone rejects the message.HttpSms::DLR\_DELIVERY\_BUFFERED4SMSC can not reach the phone and thus returns a buffered messageHttpSms::DLR\_DELIVERY\_SMSC\_SUCCESS8Message gets accepted by the SMSC but the phone is off or out of reach.HttpSms::DLR\_DELIVERY\_SMSC\_REJECT16Message gets rejected by the SMSC (unknown subscriber, invalid destination number etc).HttpSms::DLR\_ALL31All delivery notificationsKannel Check
------------

[](#kannel-check)

To check kannel status, a script named `check/kannel_check.php` is provided. N.B.: This method is a bit insecure, but if your machines are inside a "secure" environment, there should be no problem. Put the script on the server where kannel is running and adapt it to your need. You should set the `$checkUrl` attribute to the URL of the kannel\_check.php script.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0621d4cadad42f999d6e1579c6de56833cde5cdb9a4387261e3392835d96d471?d=identicon)[d4rkstar](/maintainers/d4rkstar)

---

Top Contributors

[![d4rkstar](https://avatars.githubusercontent.com/u/4957015?v=4)](https://github.com/d4rkstar "d4rkstar (10 commits)")

### Embed Badge

![Health badge](/badges/d4rkstar-yii2-kannel/health.svg)

```
[![Health](https://phpackages.com/badges/d4rkstar-yii2-kannel/health.svg)](https://phpackages.com/packages/d4rkstar-yii2-kannel)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
