Browse Source

Fixed duplicate attachments. Fixes #185

pull/190/head
Jordan Wright 5 years ago
parent
commit
e3f1b163fc
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      worker/worker.go

+ 1
- 0
worker/worker.go View File

@ -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))

Loading…
Cancel
Save