mirror of https://github.com/gophish/gophish
Fixed duplicate attachments. Fixes #185
parent
9485ea2ecd
commit
e3f1b163fc
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue