Commit 70caa1e5 authored by Pasan Mallawaarachchi's avatar Pasan Mallawaarachchi 💻

Mailgun err handle

parent ff03e99c
......@@ -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