diff --git a/server/mailserver/common/types.go b/server/mailserver/common/types.go index e95c0ade..ce87938f 100644 --- a/server/mailserver/common/types.go +++ b/server/mailserver/common/types.go @@ -21,7 +21,7 @@ type MailDto struct { MailType int32 `json:"mailtype"` MailSubType int32 `json:"mailsubtype"` Ext string `json:"ext"` - Attachment []*AttachmentDto `json:"attachments"` + Attachments []*AttachmentDto `json:"attachments"` } type App interface { diff --git a/server/mailserver/mail/mail.go b/server/mailserver/mail/mail.go index a377ce19..4c9775f8 100644 --- a/server/mailserver/mail/mail.go +++ b/server/mailserver/mail/mail.go @@ -100,6 +100,7 @@ func (this *mail) fillMailDto(p *common.MailDto) bool { p.MailType = this.mailType p.MailSubType = 0 p.Ext = "" + p.Attachments = make([]*common.AttachmentDto, 0) for _, ele := range(this.attachments) { attachment := new(common.AttachmentDto) attachment.ItemId = ele.itemId