mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: notify send email with duplicate attachments (#15493)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -65,7 +65,8 @@ func SendEmail(conf *api.SEmailConfig, msg *api.SEmailMessage) error {
|
||||
gmsg.SetHeader("Subject", msg.Subject)
|
||||
gmsg.SetBody("text/html", msg.Body)
|
||||
|
||||
for _, attach := range msg.Attachments {
|
||||
for i := range msg.Attachments {
|
||||
attach := msg.Attachments[i]
|
||||
gmsg.Attach(attach.Filename,
|
||||
mail.SetCopyFunc(func(w io.Writer) error {
|
||||
mime := attach.Mime
|
||||
|
||||
Reference in New Issue
Block a user