PHPackages                             xfstudio/yii2-smser - 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. xfstudio/yii2-smser

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

xfstudio/yii2-smser
===================

Yii2 SMS extension

1.4.0(10y ago)018BSD 3-ClausePHP

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/xfstudio/yii2-smser)[ Packagist](https://packagist.org/packages/xfstudio/yii2-smser)[ Docs](https://github.com/xfstudio/yii2-smser)[ RSS](/packages/xfstudio-yii2-smser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

yii2-smser
==========

[](#yii2-smser)

[![Latest Stable Version](https://camo.githubusercontent.com/b96b422fbf9c8eae6936f61e78234ea577ed3510ae347e46c5f878230ec0052e/68747470733a2f2f706f7365722e707567782e6f72672f786673747564696f2f796969322d736d7365722f762f737461626c65)](https://packagist.org/packages/xfstudio/yii2-smser) [![Total Downloads](https://camo.githubusercontent.com/33b698c40de5ae18b2b1efae98d8c781d5879bc616dfaa6e4d9be4c62abcc1c0/68747470733a2f2f706f7365722e707567782e6f72672f786673747564696f2f796969322d736d7365722f646f776e6c6f616473)](https://packagist.org/packages/xfstudio/yii2-smser) [![Latest Unstable Version](https://camo.githubusercontent.com/6eaa7a6c6ad4859baaf60cbd7439ca0667b14f8c4f7c440929cf3d991934e831/68747470733a2f2f706f7365722e707567782e6f72672f786673747564696f2f796969322d736d7365722f762f756e737461626c65)](https://packagist.org/packages/xfstudio/yii2-smser) [![License](https://camo.githubusercontent.com/6ecb416dfebd9a10a53ecc7efb520000809970018f0df9d98ffb8f152cabc59b/68747470733a2f2f706f7365722e707567782e6f72672f786673747564696f2f796969322d736d7365722f6c6963656e7365)](https://packagist.org/packages/xfstudio/yii2-smser)

Yii2 SMS extension （短信扩展）

包含接口：

- [中国云信](http://www.sms.cn/)
- [中国网建](http://www.smschinese.cn/)
- [商信通](http://www.sxtsms.com/)
- [云片网络](http://www.yunpian.com/)
- [云通讯](http://www.yuntongxun.com/)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/xfstudio/yii2-smser/blob/master/composer.json) for this extension's requirements and dependencies.

To install, either run

```
$ php composer.phar require xfstudio/yii2-smser "*"

```

or add

```
"xfstudio/yii2-smser": "*"

```

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

Usage
-----

[](#usage)

```
return [
    'components' => [
        'smser' => [
            // 中国云信
            'class' => 'xfstudio\smser\CloudSmser',
            'username' => 'username',
            'password' => 'password',
            'useFileTransport' => false
        ]
    ],
];
```

OR

```
return [
    'components' => [
        'smser' => [
            // 云片网
            'class' => 'xfstudio\smser\YunpianSmser',
            'apikey' => '9b11127a9701975c734b8aee81ee3526', // 请替换成您的apikey
            'useFileTransport' => false
        ]
    ],
];
```

```
Yii::$app->smser->send('15000000000', '短信内容');
```

```
// 发送模板短信
Yii::$app->smser->sendByTemplate('15000000000', ['123456'], 1);
```

License
-------

[](#license)

**yii2-smser** is released under the BSD 3-Clause License. See the bundled `LICENSE` for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 85% 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.

###  Release Activity

Cadence

Every ~38 days

Total

5

Last Release

3856d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/577552a93d0b40f2ff30f7b3fd2be53c1bcbbd109da4754bc4cc7d2c84d39c19?d=identicon)[xfstudio](/maintainers/xfstudio)

---

Top Contributors

[![daixianceng](https://avatars.githubusercontent.com/u/6077236?v=4)](https://github.com/daixianceng "daixianceng (17 commits)")[![xfstudio](https://avatars.githubusercontent.com/u/2246799?v=4)](https://github.com/xfstudio "xfstudio (3 commits)")

---

Tags

pluginsmsyii2extensionsmser

### Embed Badge

![Health badge](/badges/xfstudio-yii2-smser/health.svg)

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

###  Alternatives

[daixianceng/yii2-smser

Yii2 SMS extension

862.9k1](/packages/daixianceng-yii2-smser)[abhi1693/yii2-sms

Send Free Sms for Yii2

171.9k](/packages/abhi1693-yii2-sms)

PHPackages © 2026

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