debug-link-2

This commit is contained in:
Untone 2024-01-05 19:29:50 +03:00
parent 0ab26c19b6
commit 0aa1c2532b

View File

@ -2,6 +2,7 @@ package email
import ( import (
"context" "context"
"fmt"
"os" "os"
"time" "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) ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
defer cancel() 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 return err
} }