PHPackages                             mrgoon/aliyun-sms - 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. mrgoon/aliyun-sms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrgoon/aliyun-sms
=================

阿里云短信服务php调用代码

2.0.2(8y ago)8292.9k↓17.3%15[1 PRs](https://github.com/MissMyCat/aliyun-sms/pulls)MITPHPPHP &gt;5.3

Since Jun 28Pushed 7y ago3 watchersCompare

[ Source](https://github.com/MissMyCat/aliyun-sms)[ Packagist](https://packagist.org/packages/mrgoon/aliyun-sms)[ RSS](/packages/mrgoon-aliyun-sms/feed)WikiDiscussions master Synced 1mo ago

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

介绍
==

[](#介绍)

阿里大于关闭了新用户渠道，迁移到阿里云短信服务上，然而阿里云短信服务在5月底更新了api。 在github上找了一下，轮子都是基于2016年的接口，非常难受。 自己造了一个轮子，亲测可用。

- 安装 `composer require mrgoon/aliyun-sms dev-master`

基于laravel框架的使用方法
----------------

[](#基于laravel框架的使用方法)

- 加载 在config/app的providers中添加 `Mrgoon\AliSms\ServiceProvider::class`

同时，可以选择性添加aliases

控制台运行: `php artisan vendor:publish`

根据新增的`aliyunsms.php` 文件，在.env文件中添加环境变量：

```
ALIYUN_SMS_AK=your access key
ALIYUN_SMS_AS=your secret key
ALIYUN_SMS_SIGN_NAME=sign name

```

- 使用

```
$aliSms = new AliSms();
$response = $aliSms->sendSms('phone number', 'SMS_code', ['name'=> 'value in your template']);
//dump($response);

```

非laravel框架的使用方法
---------------

[](#非laravel框架的使用方法)

- 加载方式通过composer，不变
- 使用样例代码如下：

```
$config = [
        'access_key' => 'your access key',
        'access_secret' => 'your access secret',
        'sign_name' => 'your sign name',
    ];

    $aliSms = new Mrgoon\AliSms\AliSms();
    $response = $sms->sendSms('phone number', 'tempplate code', ['name'=> 'value in your template'], $config);

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~56 days

Total

3

Last Release

3134d ago

Major Versions

1.0.0 → 2.0.12017-10-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5907472?v=4)[Goon](/maintainers/mrgoon)[@mrgoon](https://github.com/mrgoon)

---

Top Contributors

[![MissMyCat](https://avatars.githubusercontent.com/u/16793979?v=4)](https://github.com/MissMyCat "MissMyCat (23 commits)")

---

Tags

sdkaliyunAliyun-Sms

### Embed Badge

![Health badge](/badges/mrgoon-aliyun-sms/health.svg)

```
[![Health](https://phpackages.com/badges/mrgoon-aliyun-sms/health.svg)](https://phpackages.com/packages/mrgoon-aliyun-sms)
```

PHPackages © 2026

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