PHPackages                             huying/sms-ronglian - 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. [API Development](/categories/api)
4. /
5. huying/sms-ronglian

ActiveLibrary[API Development](/categories/api)

huying/sms-ronglian
===================

容联云通讯短信发送包

0878PHP

Since Jun 3Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

容联云通讯短信发送包
==========

[](#容联云通讯短信发送包)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6eb54e8469300e57b2ba80ddabec68734f2ac014a0f54359bbe1b55a1a053126/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f687579696e672f736d732d726f6e676c69616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/huying/sms-ronglian)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/5a95d908953ce4549b87d75f5f52f47e1379c8c9ebe45099fa4f522fd4e0343f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6563686f35382f736d732d726f6e676c69616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/echo58/sms-ronglian)[![Coverage Status](https://camo.githubusercontent.com/1c6430495ecd35fa0c3422b3968dd1e2f1504a2f42cb39f68b11cd8d5f3040f4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6563686f35382f736d732d726f6e676c69616e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/echo58/sms-ronglian/code-structure)[![Quality Score](https://camo.githubusercontent.com/059271ce15dd3bde96093ebaa07c52e56958637dcaf964994d8d8927ee6cefb3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6563686f35382f736d732d726f6e676c69616e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/echo58/sms-ronglian)[![Total Downloads](https://camo.githubusercontent.com/e75f5b970dc0f9309ee40e5a6bce87490096e56db1bafdce1936067d38e2dea8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f687579696e672f736d732d726f6e676c69616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/huying/sms-ronglian)

本包实现了容联云通讯的短信发送功能。

安装
--

[](#安装)

通过 Composer 安装

```
$ composer require huying/sms-ronglian
```

使用方法
----

[](#使用方法)

### 实例化短信平台类

[](#实例化短信平台类)

```
$provider = new Huying\Sms\RongLian\Provider([
    'accountSid' => 'xxxxx',
    'authToken' => 'xxxxx',
    'appId' => 'xxxxxx',
]);
```

### 直接发送短信

[](#直接发送短信)

```
$message = Message::create()
    ->setRecipient('18800000000')
    ->setTemplateId('1')
    ->setData([
        '1',
        '2',
    ])->using($provider)
    ->send();

$message = Message::create([
    'recipient' => '18800000000',
    'template_id' => '1',
    'data' => [
        '1',
        '2',
    ],
])using($provider))->send();
```

### 判断短信是否发送成功

[](#判断短信是否发送成功)

```
if ($message->getStatus() == Huying\Sms\MessageStatus::STATUS_SENT) {
    echo '发送成功';
} else {
    echo '发送失败:错误码'.$message->getError()->getCode()
        .',错误消息:'.$message->getError()->getMessage();
}
```

更新日志
----

[](#更新日志)

请访问 [更新日志](CHANGELOG.md) 查看有关该项目的更新信息。

贡献代码
----

[](#贡献代码)

请查看 [贡献指南](CONTRIBUTING.md)。

开发者
---

[](#开发者)

- [Xujian Chen](https://github.com/xjchengo)
- [所有贡献者](../../contributors)

许可协议
----

[](#许可协议)

本项目使用 MIT 协议，详情请查看 [License File](LICENSE.md)。

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

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/812e4f96e9fc673af1ec2b1ad4536369021d54492cc970e9f408b26e4dee3bf4?d=identicon)[xjchengo](/maintainers/xjchengo)

---

Top Contributors

[![xjchengo](https://avatars.githubusercontent.com/u/4819996?v=4)](https://github.com/xjchengo "xjchengo (3 commits)")

### Embed Badge

![Health badge](/badges/huying-sms-ronglian/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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