minor-fix
This commit is contained in:
parent
2fba6af769
commit
58a91814ae
|
@ -99,10 +99,7 @@ func SendEmail(to []string, event string, data map[string]interface{}) error {
|
|||
mailgunAPIKey := os.Getenv("MAILGUN_API_KEY")
|
||||
|
||||
if len(mailgunAPIKey) > 0 {
|
||||
err = SendMailgun(to, event, data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return SendMailgun(to, event, data)
|
||||
}
|
||||
|
||||
m := gomail.NewMessage()
|
||||
|
|
|
@ -56,7 +56,7 @@ func MailgunRest(to string, data map[string]interface{}, subject string, templat
|
|||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("failed to send email, status code: %d", resp.StatusCode)
|
||||
return fmt.Errorf("failed to send email, status: %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user