Adding event for each email that's sent - can keep track of each target better this way.

pull/75/head
Jordan Wright 2016-01-14 22:50:09 -06:00
parent 89e72dd78d
commit 86e0255ae6
1 changed files with 5 additions and 1 deletions

View File

@ -9,8 +9,8 @@ import (
"strings"
"text/template"
"github.com/jordan-wright/email"
"github.com/gophish/gophish/models"
"github.com/jordan-wright/email"
)
// Logger is the logger for the worker
@ -119,6 +119,10 @@ func processCampaign(c *models.Campaign) {
if err != nil {
Logger.Println(err)
}
err = c.AddEvent(models.Event{Email: t.Email, Message: models.EVENT_SENT})
if err != nil {
Logger.Println(err)
}
}
}
err = c.UpdateStatus(models.CAMPAIGN_EMAILS_SENT)