PHPackages                             yejiancong/aliyun-dysms - 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. yejiancong/aliyun-dysms

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

yejiancong/aliyun-dysms
=======================

a extension Aliyun SMS SDK

1512PHP

Since Jul 21Pushed 3y agoCompare

[ Source](https://github.com/yejiancong/aliyun-dysms)[ Packagist](https://packagist.org/packages/yejiancong/aliyun-dysms)[ RSS](/packages/yejiancong-aliyun-dysms/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[!\[来源\]](https://github.com/songshenzong)

[![Build Status](https://camo.githubusercontent.com/6f63210cfcb8a8d0cfda65a2061206b4f01e4047c671d3266d0ca2ed3c406e70/68747470733a2f2f7472617669732d63692e6f72672f736f6e677368656e7a6f6e672f616c6979756e2d6479736d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/songshenzong/aliyun-dysms)[![Total Downloads](https://camo.githubusercontent.com/3c5463b6d4fe0dca5239d3e5a7f0132c0bf26e542ddde79acd91790aa15ea515/68747470733a2f2f706f7365722e707567782e6f72672f736f6e677368656e7a6f6e672f616c6979756e2d6479736d732f642f746f74616c2e737667)](https://packagist.org/packages/songshenzong/aliyun-dysms)[![Latest Stable Version](https://camo.githubusercontent.com/e44015904b03dcb19ccd572bafced24b8d727dd4c59df53653f5afc9644b2f2c/68747470733a2f2f706f7365722e707567782e6f72672f736f6e677368656e7a6f6e672f616c6979756e2d6479736d732f762f737461626c652e737667)](https://packagist.org/packages/songshenzong/aliyun-dysms)[![License](https://camo.githubusercontent.com/8c4a7229692edad1d5b15cc91b43bedc1a26e1a5b4651b48378082c536d451ff/68747470733a2f2f706f7365722e707567782e6f72672f736f6e677368656e7a6f6e672f616c6979756e2d6479736d732f6c6963656e73652e737667)](https://packagist.org/packages/songshenzong/aliyun-dysms)[![PHP Version](https://camo.githubusercontent.com/2b6d03554c60ba21facc3233977c7b4415b8473f79b2bd0338989162b020f184/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736f6e677368656e7a6f6e672f616c6979756e2d6479736d732e737667)](https://packagist.org/packages/songshenzong/aliyun-dysms)

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

[](#installation)

Require this package with composer:

```
composer require songshenzong/aliyun-dysms
```

Settings
--------

[](#settings)

```

 /**
 * If Laravel, Please write these fields in the `env` file
 */

 ALIYUN_DYSMS_KEY=yourAccessKeyId
 ALIYUN_DYSMS_SECRET=yourAccessKeySecret
 ALIYUN_DYSMS_SIGN=yourSignName

 /**
 * If not Laravel, You have to run these methods first.
 */

 AliyunSms::setAccessKeyId('yourAccessKeyId');
 AliyunSms::setAccessKeySecret('yourAccessKeySecret');
 AliyunSms::setSignName('yourSignName');

```

Send SMS
--------

[](#send-sms)

```

// Send SMS without `SignName` if used `setSignName`.
$response = AliyunSms::sendSms('18888888888', 'SMS_12345678', ['code' => 12345]);

// Send in bulk, no more than 1000 phone numbers.
$response = AliyunSms::sendSms('18888888888,17777777777', 'SMS_12345678', ['code' => 12345]);

$response = AliyunSms::sendBatchSms(['1500000000', '1500000001'], ['云通信', '云通信'], 'SMS_12345678', [['code' => '123'], ['code' => '456']]);

// Get Result
if (AliyunSms::ok($response)) {
   echo 'OK';
} else {
   echo 'Failed';
}

```

Laravel Artisan
---------------

[](#laravel-artisan)

Publish configuration files. If not, They can not be serialized correctly when you execute the `config:cache` Artisan command.

```
php artisan vendor:publish --provider="Songshenzong\AliyunSms\ServiceProvider"
```

Laravel Queues
--------------

[](#laravel-queues)

```

AliyunSendSmsJob::dispatch('18888888888', "SMS_12345678", ['code' => 520])->onQueue('sms');

AliyunSendSmsJob::dispatchNow('18888888888', "SMS_12345678", ['code' => 520]);

```

Laravel Notifications
---------------------

[](#laravel-notifications)

```
/**
 * Get the notification's delivery channels.
 *
 * @param   $notifiable
 *
 * @return array
 */
public function via($notifiable): array
{
    return [AliyunBatchSmsChannel::class, AliyunSmsChannel::class];
}

/**
 * @param $notifiable
 *
 * @return mixed
 */
public function toAliyunSMS($notifiable)
{
    return AliyunSms::sendSms('18888888888', 'SMS_12345678', ['code' => 12345]);
}

/**
 * @param $notifiable
 *
 * @return mixed
 */
public function toAliyunBatchSMS($notifiable)
{
    return AliyunSms::sendBatchSms(['1500000000', '1500000001'], ['云通信', '云通信'], 'SMS_12345678', [['code' => '123'], ['code' => '456']]);
}

```

More Usage
----------

[](#more-usage)

See: [https://help.aliyun.com/document\_detail/55359.html](https://help.aliyun.com/document_detail/55359.html)

Documentation
-------------

[](#documentation)

Please refer to our extensive [Wiki documentation](https://github.com/songshenzong/aliyun-dysms/wiki) for more information.

Support
-------

[](#support)

For answers you may not find in the Wiki, avoid posting issues. Feel free to ask for support on Songshenzong.com

License
-------

[](#license)

This package is licensed under the [BSD 3-Clause license](http://opensource.org/licenses/BSD-3-Clause).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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/6ce1a7e4253cf0c8333380f92f3b1b375c84e96aa83c419239d6a670a1bcaee8?d=identicon)[yejiancong](/maintainers/yejiancong)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yejiancong-aliyun-dysms/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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