|
|
- package sms
-
- import (
- "testing"
- )
-
- func Test_SendByTencent(t *testing.T) {
-
- secretId := "AKIDObaKq9NRFn6A2iBaOxGKBoqeEbjdT5Vg"
- secretKey := "0mLiqlU0IMwIOEqGWYMxLVREsMelhT3R"
- smsAppId := "1400705248"
- signname := "智企易创"
- mobiles := []string{"18607565510"}
- templateId := "1478144"
- params := []string{"666555", "5"}
-
- requestId, status, err := SendByTencent(secretId, secretKey, smsAppId, signname, mobiles, templateId, params, "ap-beijing")
-
- t.Log(*requestId)
-
- if len(status) > 0 {
- for _, v := range status {
- t.Log(*v.SerialNo, *v.PhoneNumber, *v.Code, *v.Message, *v.Fee, *v.SessionContext, *v.IsoCode)
- }
- }
- t.Log(err)
-
- }
|