mailgun-debug
This commit is contained in:
parent
95807ae319
commit
2ccc2ae4eb
|
@ -60,10 +60,12 @@ func MailgunRest(to string, data map[string]interface{}, subject string, templat
|
|||
// Log the Mailgun API response
|
||||
responseBody, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
log.Printf("Error %v reading Mailgun API response: %v", err, responseBody)
|
||||
log.Printf("Error %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("Mailgun API response: %v", responseBody)
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("failed to send email, status: %d", resp.StatusCode)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user