xuezhitech/tp5-aliyun-sms

aliyun sms package for thinkphp5

v1.1 2023-04-01 08:00 UTC

This package is auto-updated.

Last update: 2024-06-16 05:10:47 UTC


README

##使用 use xuezhitech\aliyunsms\SendSms; use OSS\OssClient; use OSS\Core\OssException;

//短信配置 $this->sms_config = [ 'accessKeyId' => Env::get('sms.access_key_id'), 'accessKeySecret' => Env::get('sms.access_key_secret'), 'SignName' => Env::get('sms.sign_name'), 'TemplateCode' => Env::get('sms.template_code') ]; $this->sms = new SendSms($this->sms_config);

//data为数组,不传默认为短信验证码 $res = $this->sms->sendSms($phone,$data);