GODT-1234 Set attachment name 'message.eml' for message/rfc822 attachments.

This commit is contained in:
Jakub
2021-07-19 14:23:46 +02:00
parent e3e4769d78
commit 63780b7b8d
8 changed files with 143 additions and 8 deletions

View File

@ -480,7 +480,7 @@ func getAttachmentPartHeader(att *pmapi.Attachment) message.Header {
hdr.SetContentDisposition(att.Disposition, map[string]string{"filename": mime.QEncoding.Encode("utf-8", att.Name)})
// Use base64 for all attachments except embedded RFC822 messages.
if att.MIMEType != "message/rfc822" {
if att.MIMEType != rfc822Message {
hdr.Set("Content-Transfer-Encoding", "base64")
} else {
hdr.Del("Content-Transfer-Encoding")