Commit 202eb0f5 authored by Stephan Handuwala's avatar Stephan Handuwala 🏋🏻

Merge branch 'master' into 'master'

Mailgun err handle

See merge request !6
parents e2808205 70caa1e5
......@@ -14,7 +14,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
......@@ -390,8 +389,8 @@ func worker(i int) {
defer cancel()
MailgunResp, id, err := mg.Send(ctx, message)
if err != nil {
log.Fatal(err)
//alertAdmin(" MAilgun Error \n" + err.Error())
// log.Fatal(err)
alertAdmin(" MAilgun Error \n" + err.Error())
}
if len(filename) > 0 {
os.Remove(filename)
......@@ -447,8 +446,8 @@ func sendMessage(mg mailgun.Mailgun, sender, subject, body, recipient, cc string
defer cancel()
resp, id, err := mg.Send(ctx, message)
if err != nil {
log.Fatal(err)
//alertAdmin(" MAilgun Error \n" + err.Error())
//log.Fatal(err)
alertAdmin(" MAilgun Error \n" + err.Error())
}
//fmt.Println(resp)
// get configurations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment