Download the PHP package quansitech/send-msg without Composer
On this page you can find all versions of the php package quansitech/send-msg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package send-msg
qs-sendmsg
统一发送消息队列
队列发送用法
1.安装及配置
1.1安装依赖及执行迁移
1.2配置发送的API设置
微信公众号发模板消息
手机短信api
方案1,采用启瑞云/中国短信网
方案2,采用其它api,详细配置请查看 easysms配置
在/app/Common/Conf/config.php中加入以下代码
1.3配置及启动队列
在后台中新增消息模板,地址 http://[host]:[port]/admin/MsgTpl/add 或写迁移文件进行添加,建议写迁移文件
启动队列wx(微信)和sms(短信)
2.在项目中新建一个消息内容转换器,需继承[BaseMsgTemplateParse],然后加上要转换的所有方法
3.构造实例
4.添加发送的消息内容及对象(可加多条)
ps."test_msg"为数据库中'qs_msg_tpl'的数据
ps."消息内容对象"示例
5.分派消息队列
5.1全部发送
5.2智能发送,(顺序发送,当一个发送成功时就不会发送后面的消息)
即时发送用法
根据队列用法1.1步骤,1.2步骤配置后即可使用
微信公众号模板消息发送
手机短信发送
发送失败时$r为false,可查看$job->error错误信息
升级
1.0升级至2.0
在.env文件下增加配置项
2.1版本后支持自定义短信发送渠道(默认还是采用启瑞云/中国短信网发送)
需要在config文件中加入以下内容
All versions of send-msg with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2.0
tiderjian/think-core Version >=12.0
overtrue/wechat Version ~4.0
overtrue/easy-sms Version ^1.1
tiderjian/think-core Version >=12.0
overtrue/wechat Version ~4.0
overtrue/easy-sms Version ^1.1
The package quansitech/send-msg contains the following files
Loading the files please wait ....