From 86e0255ae6ef8fdd5d5082c4c96e0ad93ec3df7e Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Thu, 14 Jan 2016 22:50:09 -0600 Subject: [PATCH] Adding event for each email that's sent - can keep track of each target better this way. --- worker/worker.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worker/worker.go b/worker/worker.go index 568b198b..478fb12f 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -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)