mirror of https://github.com/gophish/gophish
Added event on sending email error. Fixes #99
parent
e4be072db2
commit
17e81e6caa
|
@ -30,6 +30,7 @@ const (
|
||||||
CAMPAIGN_EMAILS_SENT string = "Emails Sent"
|
CAMPAIGN_EMAILS_SENT string = "Emails Sent"
|
||||||
CAMPAIGN_COMPLETE string = "Completed"
|
CAMPAIGN_COMPLETE string = "Completed"
|
||||||
EVENT_SENT string = "Email Sent"
|
EVENT_SENT string = "Email Sent"
|
||||||
|
EVENT_SENDING_ERROR string = "Error Sending Email"
|
||||||
EVENT_OPENED string = "Email Opened"
|
EVENT_OPENED string = "Email Opened"
|
||||||
EVENT_CLICKED string = "Clicked Link"
|
EVENT_CLICKED string = "Clicked Link"
|
||||||
STATUS_SUCCESS string = "Success"
|
STATUS_SUCCESS string = "Success"
|
||||||
|
|
|
@ -32,6 +32,12 @@ var statuses = {
|
||||||
label: "label-default",
|
label: "label-default",
|
||||||
icon: "fa-times"
|
icon: "fa-times"
|
||||||
},
|
},
|
||||||
|
"Error Sending Email": {
|
||||||
|
slice: "ct-slice-donut-error",
|
||||||
|
legend: "ct-legend-error",
|
||||||
|
label: "label-default",
|
||||||
|
icon: "fa-times"
|
||||||
|
},
|
||||||
"Unknown": {
|
"Unknown": {
|
||||||
slice: "ct-slice-donut-error",
|
slice: "ct-slice-donut-error",
|
||||||
legend: "ct-legend-error",
|
legend: "ct-legend-error",
|
||||||
|
|
|
@ -115,6 +115,10 @@ func processCampaign(c *models.Campaign) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Logger.Println(err)
|
Logger.Println(err)
|
||||||
}
|
}
|
||||||
|
err = c.AddEvent(models.Event{Email: t.Email, Message: models.EVENT_SENDING_ERROR})
|
||||||
|
if err != nil {
|
||||||
|
Logger.Println(err)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
err = t.UpdateStatus(models.EVENT_SENT)
|
err = t.UpdateStatus(models.EVENT_SENT)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue