PHPackages                             davidxu/yii2-alisms - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. davidxu/yii2-alisms

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

davidxu/yii2-alisms
===================

An Aliyun Short Message Library Package

v1.0.2(8y ago)257MITPHPPHP &gt;5.5

Since Jul 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/davidxuuts/yii2-alisms)[ Packagist](https://packagist.org/packages/davidxu/yii2-alisms)[ RSS](/packages/davidxu-yii2-alisms/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (4)Used By (0)

An Aliyun Short Message Library Package
=======================================

[](#an-aliyun-short-message-library-package)

An Aliyun Short Message Library Package

Description
-----------

[](#description)

This is for aliyun Short Message send and query purpose.

Based on Alipay SMS API 20170525.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist davidxu/yii2-alisms "*"

```

or add

```
"davidxu/yii2-alisms": "*"

```

to the require section of your `composer.json` file, and run

```
"php composer.phar update"

```

Usage
-----

[](#usage)

To send sms, follow the following example

```
use davidxu\alisms\Sms;

class AliSms extends Controller
{
    public function actionSend()
    {

        $alisms = new Sms();
        $alisms->accessKeyId = 'your-alismsAccessKeyId';
        $alisms->accessKeySecret = 'your-alismsAccessKeySecret';
        $alisms->signName = 'your-smsSignName';

        $mobiles = [
            '18800000000',
            '18800000002',
        ];
        $response = $alisms->sendSms('your-template-code', $mobiles);
        return $response;
    }

    public function actionQuery()
    {
        $alisms = new Sms();
        $alisms->accessKeyId = Yii::$app->params['alismsAccessKeyId'];
        $alisms->accessKeySecret = Yii::$app->params['alismsAccessKeySecret'];
        $alisms->signName = Yii::$app->params['smsSignName'];

        $mobile = '18800000001';
        $queryDate = '20170720';
        $response = $alisms->querySendDetails($mobile, $queryDate);
        return $response;
    }
}

```

Contact
-------

[](#contact)

If anything please contact at

Have fun.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59e94d6d1e147e3ed702e4f3dcbeb3eca9a9b228ad58dc014530212e0a3f3ba5?d=identicon)[davidxuuts](/maintainers/davidxuuts)

---

Tags

yii2extensionAliyun-Sms

### Embed Badge

![Health badge](/badges/davidxu-yii2-alisms/health.svg)

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

###  Alternatives

[nterms/yii2-mailqueue

Email queue component for yii2 that works with yii2-swiftmailer.

87129.2k2](/packages/nterms-yii2-mailqueue)[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)[odaialali/yii2-toastr

This is the Toastr extension for Yii 2. It encapsulates Toastr plugin in terms of Yii widgets, and makes ajax notification easy to implement.

1486.3k](/packages/odaialali-yii2-toastr)[bryglen/yii2-sendgrid

Sendgrid Mailer for Yii 2

1353.5k](/packages/bryglen-yii2-sendgrid)

PHPackages © 2026

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