PHPackages                             duxphp/duxsend - 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. duxphp/duxsend

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

duxphp/duxsend
==============

DuxPHP Send class

1.0.2(2y ago)3103Apache-2.0PHPPHP &gt;=7.0

Since Nov 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/duxphp/duxSend)[ Packagist](https://packagist.org/packages/duxphp/duxsend)[ Docs](http://duxphp.com/)[ RSS](/packages/duxphp-duxsend/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (4)Used By (0)

 [ ![DuxShop](https://github.com/duxphp/duxphp/raw/master/docs/logo.png?raw=true) ](https://github.com/duxphp/duxfiles)

 为快速开发而生

 [ ![maven](https://camo.githubusercontent.com/f3cbd40ba9c13fda2443b92d09e298f4588f8842772d62baa771f10be6806c96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44757853656e642d76312d626c75652e737667) ](https://github.com/duxphp/duxfiles) [ ![code style](https://camo.githubusercontent.com/1acd6576e24f5553ed3027c2fea7cf91c272f51722dbaf3d6757a8135dc3e2c3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7a6c69622d6c6963656e7365732d627269676874677265656e2e737667) ](http://zlib.net/zlib_license.html)

简介
==

[](#简介)

DuxSend 是一款支持多种平台接口的短信、邮件等推送类

支持平台
====

[](#支持平台)

- SMTP邮件
- 阿里云邮件
- 阿里云短信
- 小米推送
- 极光推送
- 云片短信

环境支持
====

[](#环境支持)

- 语言版本：PHP 7.1+

讨论
==

[](#讨论)

QQ群：131331864

> 本系统非盈利产品，为防止垃圾广告和水群已开启收费入群，收费入群并不代表我们可以无条件回答您的问题，入群之前请仔细查看文档，常见安装等问题通过搜索引擎解决，切勿做伸手党

bug反馈
=====

[](#bug反馈)

[issues反馈](https://github.com/duxphp/duxFiles/issues)

版权说明
====

[](#版权说明)

本项目使用MIT开源协议，您可以在协议允许范围内进行进行商业或非商业项目使用

开发团队
====

[](#开发团队)

湖南聚匠信息科技有限公司

安装说明
====

[](#安装说明)

```
composer require duxphp/duxsend

```

使用方法
====

[](#使用方法)

实例化操作类

```
 $driver = \dux\send\Email::class;  //驱动类名
 $config = []; //驱动配置
 $send = new \dux\Send($driver, $config);

```

配置信息

```
 // 阿里邮件
 $driver = \dux\send\AliMail::class;
 $config = [
     'api_id' => '',   //接口账号
     'apy_key' => '',  //接口秘钥
     'mail' => '',     //发件邮箱
 ];

```

```
 // 阿里云短信
 $driver = \dux\send\AliSms::class;
 $config = [
     'api_id' => '',   //AccessKey ID
     'apy_key' => '',  //Access Key Secret
     'sign' => '',     //短信签名
 ];

```

```
 // SMTP邮件
 $driver = \dux\send\Email::class;
 $config = [
     'host' => '',       //SMTP地址
     'username' => '',   //邮箱账号
     'password' => '',   //邮箱密码
     'port' => '',       //SMTP端口
     'mail' => '',       //发件邮箱
 ];

```

```
 // 极光推送
 $driver = \dux\send\Jpush::class;
 $config = [
     'app_key' => '',          //接口密钥
     'master_kecret' => '',
 ];

```

```
 // 小米推送
 $driver = \dux\send\Xiaomi::class;
 $config = [
     'ios_key' => '',         //IOS密钥
     'android_key' => '',     //安卓密钥
     'android_name' => '',    //安卓包名
 ];

```

```
 // 云片短信
 $driver = \dux\send\Yunpian::class;
 $config = [
     'api_key' => '',         //接口密钥
 ];

```

检测接收账号

```
 /**
  * @param $receive  //接收账号、号码或推送别名
  * @return bool
  * @throws \Exception
  */
 $send->check($receive);

```

发送消息

```
 /**
  * @param $receive          //接收账号、号码或推送别名
  * @param string $title     //发信标题，邮件有效，短信、推送等无效
  * @param string $content   //发信内容，邮件可为 Html,其他为字符串
  * @param array $params     //附件参数，模板短信传递 "tpl" 键名为模板 ID，其他参数为模板值
  * @return mixed
  * @throws \Exception
  */
 $send->send($receive, string $title, string $content, array $params = []);

```

异常捕获

```
 try {
     ...
 } catch (\Exception $e) {
     echo $e->getMessage();
 }

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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 ~682 days

Total

3

Last Release

1018d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4553e50838920d29d2d9ae7b9472761ac4f5e88d34520842a0dbb704d465b37?d=identicon)[duxphp](/maintainers/duxphp)

---

Top Contributors

[![dux-web](https://avatars.githubusercontent.com/u/2184214?v=4)](https://github.com/dux-web "dux-web (12 commits)")[![t199398](https://avatars.githubusercontent.com/u/19924233?v=4)](https://github.com/t199398 "t199398 (1 commits)")

---

Tags

emailsmsduxphp

### Embed Badge

![Health badge](/badges/duxphp-duxsend/health.svg)

```
[![Health](https://phpackages.com/badges/duxphp-duxsend/health.svg)](https://phpackages.com/packages/duxphp-duxsend)
```

###  Alternatives

[mageplaza/module-smtp

SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers

3015.9M8](/packages/mageplaza-module-smtp)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)[symfony/fake-sms-notifier

Fake SMS (as email or log during development) Notifier Bridge.

27754.2k1](/packages/symfony-fake-sms-notifier)[nikolaposa/notifier

Extensible library for building notifications and sending them via different delivery channels.

211.6k](/packages/nikolaposa-notifier)

PHPackages © 2026

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