package sms import ( "testing" ) func Test_SendByALiYun(t *testing.T) { accessKeyId := "LTAI5tCxxykQfnZtmYD8tm2x" accessKeySecret := "RgbY2Z9ciVc3ljXPr6OXw1ycn3rCIu" signName := "鄱阳湖生态科技城" phoneNumbers := "13790717280" templateCode := "SMS_224500006" params := make(map[string]string, 0) params["code"] = "666666" TemplateParam, _ := json.Marshal(params) ret, err := SendByALiYun(accessKeyId, accessKeySecret, phoneNumbers, signName, templateCode, string(TemplateParam)) t.Log(ret) t.Log(err) }