diff --git a/aliyun.go b/aliyun.go index 13481be..56c13f5 100644 --- a/aliyun.go +++ b/aliyun.go @@ -68,6 +68,9 @@ func (c *AliyunClient) SendMessage(param map[string]string, targetPhoneNumber .. request.TemplateParam = string(requestParam) request.SignName = c.sign - _, err = c.core.SendSms(request) + response, err := c.core.SendSms(request) + if response.Code != "OK" { + return fmt.Errorf(response.Message) + } return err }