From 0aa1c2532be504f6b95e1d0765a24e3a4dcc430b Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 5 Jan 2024 19:29:50 +0300 Subject: [PATCH] debug-link-2 --- server/email/mailgun.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/email/mailgun.go b/server/email/mailgun.go index 3fe45da..26e1129 100644 --- a/server/email/mailgun.go +++ b/server/email/mailgun.go @@ -2,6 +2,7 @@ package email import ( "context" + "fmt" "os" "time" @@ -27,9 +28,13 @@ func MailgunRest(to string, data map[string]interface{}, subject string, templat ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) defer cancel() - _, id, err := mg.Send(ctx, m) + resp, id, err := mg.Send(ctx, m) - log.Printf(id) + if err != nil { + log.Fatal(err) + } + + fmt.Printf("ID: %s Resp: %s\n", id, resp) return err }