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

Mailgun err handle

parent ff03e99c
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"log"
"net/http" "net/http"
"os" "os"
"strconv" "strconv"
...@@ -390,8 +389,8 @@ func worker(i int) { ...@@ -390,8 +389,8 @@ func worker(i int) {
defer cancel() defer cancel()
MailgunResp, id, err := mg.Send(ctx, message) MailgunResp, id, err := mg.Send(ctx, message)
if err != nil { if err != nil {
log.Fatal(err) // log.Fatal(err)
//alertAdmin(" MAilgun Error \n" + err.Error()) alertAdmin(" MAilgun Error \n" + err.Error())
} }
if len(filename) > 0 { if len(filename) > 0 {
os.Remove(filename) os.Remove(filename)
...@@ -447,8 +446,8 @@ func sendMessage(mg mailgun.Mailgun, sender, subject, body, recipient, cc string ...@@ -447,8 +446,8 @@ func sendMessage(mg mailgun.Mailgun, sender, subject, body, recipient, cc string
defer cancel() defer cancel()
resp, id, err := mg.Send(ctx, message) resp, id, err := mg.Send(ctx, message)
if err != nil { if err != nil {
log.Fatal(err) //log.Fatal(err)
//alertAdmin(" MAilgun Error \n" + err.Error()) alertAdmin(" MAilgun Error \n" + err.Error())
} }
//fmt.Println(resp) //fmt.Println(resp)
// get configurations // 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