Fixed duplicate attachments. Fixes #185

pull/190/head
Jordan Wright 2016-03-02 08:44:37 -06:00
parent 9485ea2ecd
commit e3f1b163fc
1 changed files with 1 additions and 0 deletions

View File

@ -114,6 +114,7 @@ func processCampaign(c *models.Campaign) {
e.Subject = string(subjBuff.Bytes()) e.Subject = string(subjBuff.Bytes())
Logger.Println("Creating email using template") Logger.Println("Creating email using template")
e.To = []string{t.Email} e.To = []string{t.Email}
e.Attachments = []*email.Attachment{}
// Attach the files // Attach the files
for _, a := range c.Template.Attachments { for _, a := range c.Template.Attachments {
decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(a.Content)) decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(a.Content))