> 插件說明:支持近三十家服務商的短信服務,所有涉及短信的地方都會調用此插件設置

> 以下為各個短信服務商的參數列表(每個標題都是可以點擊進入對應官網)
*****
### [阿里云](https://www.aliyun.com/)
短信內容使用`template`+`data`
~~~html
'aliyun' => [
'access_key_id' => '',
'access_key_secret' => '',
'sign_name' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E9%98%BF%E9%87%8C%E4%BA%91rest)[阿里云Rest](https://www.aliyun.com/)
短信內容使用`template`+`data`
~~~html
'aliyunrest' => [
'app_key' => '',
'app_secret_key' => '',
'sign_name' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E9%98%BF%E9%87%8C%E4%BA%91%E5%9B%BD%E9%99%85)[阿里云國際](https://www.alibabacloud.com/help/zh/doc-detail/160524.html)
短信內容使用`template`+`data`
~~~html
'aliyunintl' => [
'access_key_id' => '',
'access_key_secret' => '',
'sign_name' => '',
],
~~~
發送示例:
~~~html
use Overtrue\EasySms\PhoneNumber;
$easySms = new EasySms($config);
$phone_number = new PhoneNumber(18888888888, 86);
$easySms->send($phone_number, [
'content' => '您好:先生/女士!您的驗證碼為${code},有效時間是5分鐘,請及時驗證。',
'template' => 'SMS_00000001', // 模板ID
'data' => [
"code" => 521410,
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E4%BA%91%E7%89%87)[云片](https://www.yunpian.com/)
短信內容使用`content`
~~~html
'yunpian' => [
'api_key' => '',
'signature' => '【默認簽名】', // 內容中無簽名時使用
],
~~~
### [](https://github.com/overtrue/easy-sms#submail)[Submail](https://www.mysubmail.com/)
短信內容使用`data`
~~~html
'submail' => [
'app_id' => '',
'app_key' => '',
'project' => '', // 默認 project,可在發送時 data 中指定
],
~~~
### [](https://github.com/overtrue/easy-sms#%E8%9E%BA%E4%B8%9D%E5%B8%BD)[螺絲帽](https://luosimao.com/)
短信內容使用`content`
~~~html
'luosimao' => [
'api_key' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E5%AE%B9%E8%81%94%E4%BA%91%E9%80%9A%E8%AE%AF)[容聯云通訊](http://www.yuntongxun.com/)
短信內容使用`template`+`data`
~~~html
'yuntongxun' => [
'app_id' => '',
'account_sid' => '',
'account_token' => '',
'is_sub_account' => false,
],
~~~
### [](https://github.com/overtrue/easy-sms#%E4%BA%92%E4%BA%BF%E6%97%A0%E7%BA%BF)[互億無線](http://www.ihuyi.com/)
短信內容使用`content`
~~~html
'huyi' => [
'api_id' => '',
'api_key' => '',
'signature' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E8%81%9A%E5%90%88%E6%95%B0%E6%8D%AE)[聚合數據](https://www.juhe.cn/)
短信內容使用`template`+`data`
~~~html
'juhe' => [
'app_key' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#sendcloud)[SendCloud](http://www.sendcloud.net/)
短信內容使用`template`+`data`
~~~html
'sendcloud' => [
'sms_user' => '',
'sms_key' => '',
'timestamp' => false, // 是否啟用時間戳
],
~~~
### [](https://github.com/overtrue/easy-sms#%E7%99%BE%E5%BA%A6%E4%BA%91)[百度云](https://cloud.baidu.com/)
短信內容使用`template`+`data`
~~~html
'baidu' => [
'ak' => '',
'sk' => '',
'invoke_id' => '',
'domain' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E5%8D%8E%E4%BF%A1%E7%9F%AD%E4%BF%A1%E5%B9%B3%E5%8F%B0)[華信短信平臺](http://www.ipyy.com/)
短信內容使用`content`
~~~html
'huaxin' => [
'user_id' => '',
'password' => '',
'account' => '',
'ip' => '',
'ext_no' => '',
],
~~~
### [](https://github.com/overtrue/easy-sms#253%E4%BA%91%E9%80%9A%E8%AE%AF%E5%88%9B%E8%93%9D)[253云通訊(創藍)](https://www.253.com/)
短信內容使用`content`
~~~html
'chuanglan' => [
'account' => '',
'password' => '',
// 國際短信時必填
'intel_account' => '',
'intel_password' => '',
// \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE => 驗證碼通道(默認)
// \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_PROMOTION_CODE => 會員營銷通道
'channel' => \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE,
// 會員營銷通道 特定參數。創藍規定:api提交營銷短信的時候,需要自己加短信的簽名及退訂信息
'sign' => '【通訊云】',
'unsubscribe' => '回TD退訂',
],
~~~
### [](https://github.com/overtrue/easy-sms#%E8%9E%8D%E4%BA%91)[融云](http://www.rongcloud.cn/)
短信分為兩大類,驗證類和通知類短信。 發送驗證類短信使用`template`+`data`
~~~html
'rongcloud' => [
'app_key' => '',
'app_secret' => '',
]
~~~
### [](https://github.com/overtrue/easy-sms#%E5%A4%A9%E6%AF%85%E6%97%A0%E7%BA%BF)[天毅無線](http://www.85hu.com/)
短信內容使用`content`
~~~html
'tianyiwuxian' => [
'username' => '', //用戶名
'password' => '', //密碼
'gwid' => '', //網關ID
]
~~~
### [](https://github.com/overtrue/easy-sms#twilio)[twilio](https://www.twilio.com/)
短信使用`content`發送對象需要 使用`+`添加區號
~~~html
'twilio' => [
'account_sid' => '', // sid
'from' => '', // 發送的號碼 可以在控制臺購買
'token' => '', // apitoken
],
~~~
### [](https://github.com/overtrue/easy-sms#tiniyo)[tiniyo](https://www.tiniyo.com/)
短信使用`content`發送對象需要 使用`+`添加區號
~~~html
'tiniyo' => [
'account_sid' => '', // auth_id from https://tiniyo.com
'from' => '', // 發送的號碼 可以在控制臺購買
'token' => '', // auth_secret from https://tiniyo.com
],
~~~
### [](https://github.com/overtrue/easy-sms#%E8%85%BE%E8%AE%AF%E4%BA%91-sms)[騰訊云 SMS](https://cloud.tencent.com/product/sms)
短信內容使用`template`+`data`
~~~html
'qcloud' => [
'sdk_app_id' => '', // 短信應用的 SDK APP ID
'secret_id' => '', // SECRET ID
'secret_key' => '', // SECRET KEY
'sign_name' => '騰訊CoDesign', // 短信簽名
],
~~~
發送示例:
~~~html
$easySms->send(18888888888, [
'template' => 101234, // 模板ID
'data' => [
"a", 'b', 'c', 'd', //按占位順序給值
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E9%98%BF%E5%87%A1%E8%BE%BE%E6%95%B0%E6%8D%AE)[阿凡達數據](http://www.avatardata.cn/)
短信內容使用`template`+`data`
~~~html
'avatardata' => [
'app_key' => '', // APP KEY
],
~~~
### [](https://github.com/overtrue/easy-sms#%E5%8D%8E%E4%B8%BA%E4%BA%91-sms)[華為云 SMS](https://www.huaweicloud.com/product/msgsms.html)
短信內容使用`template`+`data`
~~~html
'huawei' => [
'endpoint' => '', // APP接入地址
'app_key' => '', // APP KEY
'app_secret' => '', // APP SECRET
'from' => [
'default' => '1069012345', // 默認使用簽名通道號
'custom' => 'csms12345', // 其他簽名通道號 可以在 data 中定義 from 來指定
'abc' => 'csms67890', // 其他簽名通道號
...
],
'callback' => '' // 短信狀態回調地址
],
~~~
使用默認簽名通道`default`
~~~html
$easySms->send(13188888888, [
'template' => 'SMS_001',
'data' => [
6379
],
]);
~~~
使用指定簽名通道
~~~html
$easySms->send(13188888888, [
'template' => 'SMS_001',
'data' => [
6379,
'from' => 'custom' // 對應 config 中的 from 數組中 custom
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E7%BD%91%E6%98%93%E4%BA%91%E4%BF%A1)[網易云信](https://yunxin.163.com/sms)
短信內容使用`template`+`data`
~~~html
'yunxin' => [
'app_key' => '',
'app_secret' => '',
'code_length' => 4, // 隨機驗證碼長度,范圍 4~10,默認為 4
'need_up' => false, // 是否需要支持短信上行
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => 'SMS_001', // 不填則使用默認模板
'data' => [
'code' => 8946, // 如果設置了該參數,則 code_length 參數無效
'action' => 'sendCode', // 默認為 `sendCode`,校驗短信驗證碼使用 `verifyCode`
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E4%BA%91%E4%B9%8B%E8%AE%AF)[云之訊](https://www.ucpaas.com/index.html)
短信內容使用`template`+`data`
~~~html
'yunzhixun' => [
'sid' => '',
'token' => '',
'app_id' => '',
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => 'SMS_001',
'data' => [
'params' => '8946,3', // 模板參數,多個參數使用 `,` 分割,模板無參數時可為空
'uid' => 'hexianghui', // 用戶 ID,隨狀態報告返回,可為空
'mobiles' => '18888888888,188888888889', // 批量發送短信,手機號使用 `,` 分割,不使用批量發送請不要設置該參數
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E5%87%AF%E4%BF%A1%E9%80%9A)[凱信通](http://www.kingtto.cn/)
短信內容使用`content`
~~~html
'kingtto' => [
'userid' => '',
'account' => '',
'password' => '',
],
~~~
~~~html
$easySms->send(18888888888, [
'content' => '您的驗證碼為: 6379',
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E4%B8%83%E7%89%9B%E4%BA%91)[七牛云](https://www.qiniu.com/)
短信內容使用`template`+`data`
~~~html
'qiniu' => [
'secret_key' => '',
'access_key' => '',
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => '1231234123412341234',
'data' => [
'code' => 1234,
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#ucloud)[Ucloud](https://www.ucloud.cn/)
短信使用`template`+`data`
~~~html
'ucloud' => [
'private_key' => '', //私鑰
'public_key' => '', //公鑰
'sig_content' => '', // 短信簽名,
'project_id' => '', //項目ID,子賬號才需要該參數
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => 'UTAXXXXX', //短信模板
'data' => [
'code' => 1234, //模板參數,模板沒有參數不用則填寫,有多個參數請用數組,[1111,1111]
'mobiles' =>'', //同時發送多個手機短信,請用數組[xxx,xxx]
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E7%9F%AD%E4%BF%A1%E5%AE%9D)[短信寶](http://www.smsbao.com/)
短信使用`content`
~~~html
'smsbao' => [
'user' => '', //賬號
'password' => '' //密碼
],
~~~
~~~html
$easySms->send(18888888888, [
'content' => '您的驗證碼為: 6379', //短信模板
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E6%91%A9%E6%9D%9C%E4%BA%91)[摩杜云](https://www.moduyun.com/)
短信使用`template`+`data`
~~~html
'moduyun' => [
'accesskey' => '', //必填 ACCESS KEY
'secretkey' => '', //必填 SECRET KEY
'signId' => '', //選填 短信簽名,如果使用默認簽名,該字段可缺省
'type' => 0, //選填 0:普通短信;1:營銷短信
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => '5a95****b953', //短信模板
'data' => [
1234, //模板參數,對應模板的{1}
30 //模板參數,對應模板的{2}
//...
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E8%9E%8D%E5%90%88%E4%BA%91%E5%8A%A9%E9%80%9A)[融合云(助通)](https://www.ztinfo.cn/products/sms)
短信使用`template`+`data`
~~~html
'rongheyun' => [
'username' => '', //必填 用戶名
'password' => '', //必填 密碼
'signature'=> '', //必填 已報備的簽名
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => '31874', //短信模板
'data' => [
'valid_code' => '888888', //模板參數,對應模板的{valid_code}
//...
],
]);
~~~
### [](https://github.com/overtrue/easy-sms#%E8%9C%98%E8%9B%9B%E4%BA%91)[蜘蛛云](https://zzyun.com/)
短信使用`template`+`data`
~~~html
'zzyun' => [
'user_id' => '', //必填 會員ID
'secret' => '', //必填 接口密鑰
'sign_name'=> '', //必填 短信簽名
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => 'SMS_210317****', //短信模板
'data' => [
'code' => '888888', //模板參數,對應模板的{code}
//...
],
]);
~~~
### [融合云信](https://maap.wo.cn/)
短信使用`template`+`data`
~~~html
'maap' => [
'cpcode' => '', //必填 商戶編碼
'key' => '', //必填 接口密鑰
'excode'=> '', //選填 擴展名
],
~~~
~~~html
$easySms->send(18888888888, [
'template' => '356120', //短信模板
'data' => [
'123465'
],//模板參數
]);
~~~
### [天瑞云](http://cms.tinree.com/)
短信內容使用`template`+`data`
~~~html
'tinree' => [
'accesskey' => '', // 平臺分配給用戶的accesskey
'secret' => '', // 平臺分配給用戶的secret
'sign' => '', // 平臺上申請的接口短信簽名或者簽名ID
],
~~~
發送示例:
~~~html
$easySms->send(18888888888, [
'template' => '123456', // 模板ID
'data' => [
"a", 'b', 'c', //按模板變量占位順序
],
]);
~~~
### [時代互聯](https://www.now.cn/)
短信使用`content`
~~~html
'nowcn' => [
'key' => '', //用戶ID
'secret' => '', //開發密鑰
'api_type' => '', // 短信通道,
],
~~~
發送示例:
~~~html
$easySms->send(18888888888, [
'content' => '您的驗證碼為: 6379',
]);
~~~
### [火山引擎](https://console.volcengine.com/sms/)
短信內容使用`template`+`data`
~~~html
'volcengine' => [
'access_key_id' => '', // 平臺分配給用戶的access_key_id
'access_key_secret' => '', // 平臺分配給用戶的access_key_secret
'region_id' => 'cn-north-1', // 國內節點 cn-north-1,國外節點 ap-singapore-1,不填或填錯,默認使用國內節點
'sign_name' => '', // 平臺上申請的接口短信簽名或者簽名ID,可不填,發送短信時data中指定
'sms_account' => '', // 消息組帳號,火山短信頁面右上角,短信應用括號中的字符串,可不填,發送短信時data中指定
],
~~~
發送示例1:
~~~html
$easySms->send(18888888888, [
'template' => 'SMS_123456', // 模板ID
'data' => [
"code" => 1234 // 模板變量
],
]);
~~~
發送示例2:
~~~html
$easySms->send(18888888888, [
'template' => 'SMS_123456', // 模板ID
'data' => [
"template_param" => ["code" => 1234], // 模板變量參數
"sign_name" => "yoursignname", // 簽名,覆蓋配置文件中的sign_name
"sms_account" => "yoursmsaccount", // 消息組帳號,覆蓋配置文件中的sms_account
"phone_numbers" => "18888888888,18888888889", // 手機號,批量發送,英文的逗號連接多個手機號,覆蓋發送方法中的填入的手機號
],
]);
~~~
- 序言
- 使用條款
- 安裝
- 環境搭建
- 目錄結構
- 鉤子和行為
- 表單生成
- 數據限制
- 命令行
- 一鍵生成CRUD
- 一鍵生成菜單
- 一鍵安裝
- 系統配置
- 常規字段
- 特殊字段1:下拉框(高級)字段
- 特殊字段2:自定義字段
- 特殊字段3:自定義多圖片
- 系統函數/類
- 函數說明
- cache - 緩存管理
- thumb - 獲取縮略圖
- str_cut - 字符截取
- 郵箱/短信
- 插件使用說明
- cms內容管理【cms】
- 變量/常量
- 函數
- getCategory - 欄目獲取
- catpos - 面包屑
- seo - 生成SEO
- buildCatUrl - 生成欄目URL
- buildContentUrl - 創建內容鏈接
- 標簽
- 公共參數
- 欄目標簽
- 列表標簽
- 上一頁標簽
- 下一頁標簽
- Tags標簽
- 萬能標簽
- 原生標簽
- 搜索頁
- 篩選頁
- 內容詳情頁
- 模板
- 技巧/問題
- 將CMS路由設置更簡潔
- 外鏈和單頁如何增加列表類型的子欄目
- 如何合理設置SEO
- 實現電腦和手機模板分離
- 敏感詞檢測
- 欄目授權不全
- 內容頁分頁
- 分頁偽靜態
- tag標簽不支持特殊字符
- 部分虛擬主機tags頁面報錯
- 循環表格
- 二級目錄搭建知識點
- 閱讀收費
- 會員插件【member】
- 介紹
- 自定義表單【formguide】
- 調用方式
- 模板
- 支付插件【pay】
- 支付寶
- 微信
- 常見問題
- 接口文檔【apidoc】
- 簡介
- 配置
- 使用
- 萬能采集【collection】
- 采集列表規則
- 采集內容規則
- 關于圖片
- 案例一:采集yzncms論壇
- cms小程序【wxcms】(重構已下架)
- 前端
- H5設計【diywap】
- 返回頂部【returntop】
- 通用數據導出【dataoutput】
- 多通道短信【easysms】
- 塞郵郵箱【saiyouems】
- 第三方登錄【synclogin】
- 中文分詞【getwords】
- QQ客服【kefu】
- 地圖位置【address】
- 智能人機驗證【vaptcha】
- 行為驗證碼【ajcaptcha】
- 數據轉換【v9toyzn】
- 數據轉換【dedetoyzn】
- 百度收錄查詢【baidurecord】
- 蜘蛛訪問統計【spider】
- editormd編輯器【editormd】
- 敏感詞檢測【sensitive】
- 郵箱發送【phpmailer】
- 內容收藏【favorite】
- 隊列插件【queue】
- 七牛云【qiniu】
- 阿里云oss【alioss】
- 騰訊云【cos】
- 迅搜全文檢索【xunsearch】
- 評論插件【comments】
- 網頁即時通訊【webim】(重構已下架)
- 生成js
- window使用
- linux使用(推薦)
- 常見問題
- 友情鏈接【links】
- 考試插件【kaoshi】(暫停)
- 會員邀請【invite】
- 快遞查詢插件【expressquery】
- 禮品卡提貨系統【pickup】
- 地區插件【area】
- IP歸屬地查詢【ipregion】
- 百度統計插件【baidutongji】
- 消息通知【notice】
- 微信管理【wechat】
- 在線投票系統【vote】
- 前端&組件
- 后臺前端框架
- 文件上傳
- table數據表格
- auth權限驗證
- 動態顯示(Favisible)
- 動態下拉(SelectPage)
- 鍵值組件(Fieldlist)
- uniapp教程
- 常見問題
- YznCMS開發遇到錯誤怎么辦?(新手必看)
- 關閉調試模式
- 偽靜態(URL重寫)
- 虛擬主機不支持綁定public的方法
- 各類虛擬主機偽靜態使用注意事項
- 百度編輯器多圖片上傳被壓縮
- 如何去除訪問鏈接中的index.php
- 后臺路徑admin.php修改
- 后臺密碼忘記重置方法
- 寶塔面板一鍵部署
- 后臺登錄時驗證碼不顯示
- 小程序圖片不顯示
- 如何自定義404頁面顯示模板
- 管理員登錄時提示請于1天后再嘗試登錄
- composer
- composer簡介
- 內置composer
- 各大廠商鏡像地址
- 常用命令
- 拓展知識
- 助手類
- thinkphp維護
- 插件開發
- 目錄結構
- 數據庫
- 測試數據
- 插件信息
- 插件配置
- 核心文件
- 插件函數
- ??開發者入駐
- 申請入駐
- 建立私庫
- 插件入駐流程
- 模板入駐流程
- 安全建議
- 更新日記和補丁包