import (
"fmt"
"github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi"
)
func SendAliSMS(number,code string,) {
regionid:="cn-hangzhou"
accessKeyId:="****"
accessKeySecret:="****"
signName:="1024问"
templateCode:="SMS_224660135" //SMS_116590500
client, err := dysmsapi.NewClientWithAccessKey(regionid, accessKeyId, accessKeySecret)
request := dysmsapi.CreateSendSmsRequest()
request.Scheme = "https"
request.PhoneNumbers = number
request.SignName = signName
request.TemplateCode = templateCode
request.TemplateParam = "{\"code\":\""+code+"\"}"
response, err := client.SendSms(request)
if err != nil {
fmt.Print(err.Error())
}
fmt.Printf("response is %#v\n", response)
}