duxphp/duxsend 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

duxphp/duxsend

Composer 安装命令:

composer require duxphp/duxsend

包简介

DuxPHP Send class

README 文档

README

DuxShop

为快速开发而生

maven code style

简介

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

支持平台

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

环境支持

  • 语言版本:PHP 7.1+

讨论

QQ群:131331864

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

bug反馈

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();
 }

统计信息

  • 总下载量: 103
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固