From e3f1b163fc8ef6ee861d28d2c07e064205bd9992 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Wed, 2 Mar 2016 08:44:37 -0600 Subject: [PATCH] Fixed duplicate attachments. Fixes #185 --- worker/worker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/worker/worker.go b/worker/worker.go index 67259de3..214828e6 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -114,6 +114,7 @@ func processCampaign(c *models.Campaign) { e.Subject = string(subjBuff.Bytes()) Logger.Println("Creating email using template") e.To = []string{t.Email} + e.Attachments = []*email.Attachment{} // Attach the files for _, a := range c.Template.Attachments { decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(a.Content))