Skip to content

Commit

Permalink
feat: add log for SendCodeEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Apr 10, 2024
1 parent ae45047 commit ca0c2f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utils/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions"
ses "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ses/v20201002"
"go.uber.org/zap"
)

func SendCodeEmail(code, receiver string) error {
Expand Down Expand Up @@ -37,7 +38,11 @@ func SendCodeEmail(code, receiver string) error {
request.TriggerType = common.Uint64Ptr(1)

// 返回的resp是一个SendEmailResponse的实例,与请求对象对应
_, err = client.SendEmail(request)
resp, err := client.SendEmail(request)
if err != nil {
return err
}
Logger.Info("SendEmailResponse", zap.String("Response", resp.ToJsonString()))
return err
}

Expand Down

0 comments on commit ca0c2f8

Please sign in to comment.