Exemple #1
0
func sms_status() {
	sender := luosimao.NewSMSSender(smsAuth, luosimao.JSON)
	resp, err := sender.Status(1000)
	if err != nil {
		fmt.Println(err.Error())
	} else {
		b, _ := json.Marshal(resp)
		fmt.Println(string(b))
		fmt.Println(resp.ErrorDescription())
	}
}
Exemple #2
0
func send_sms_batch(mobiles string, message string) {
	sender := luosimao.NewSMSSender(smsAuth, luosimao.JSON)
	resp, err := sender.BatchSend(luosimao.BatchSMSRequest{MobileList: mobiles, Message: message, Time: ""}, 1000)
	if err != nil {
		fmt.Println(err.Error())
	} else {
		b, _ := json.Marshal(resp)
		fmt.Println(string(b))
		fmt.Println(resp.ErrorDescription())
	}
}
Exemple #3
0
func send_sms(mobile, message string) {
	sender := luosimao.NewSMSSender(smsAuth, luosimao.JSON)
	resp, err := sender.Send(luosimao.SMSRequest{Mobile: mobile, Message: message}, 1000)
	if err != nil {
		fmt.Println(err.Error())
	} else {
		b, _ := json.Marshal(resp)
		fmt.Println(string(b))
		fmt.Println(resp.ErrorDescription())
	}
}