From 1f19d4df7508240d78a90cbbf53bbcd528cb3c9a Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Wed, 31 Mar 2021 14:22:21 +0200 Subject: [PATCH] GODT-213: Force text/plain for custom message text part --- pkg/message/build_rfc822_custom.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/message/build_rfc822_custom.go b/pkg/message/build_rfc822_custom.go index 07d56da4..e1526b1f 100644 --- a/pkg/message/build_rfc822_custom.go +++ b/pkg/message/build_rfc822_custom.go @@ -81,7 +81,8 @@ func writeCustomTextPart( var hdr message.Header - hdr.SetContentType(msg.MIMEType, nil) + // Even if it is HTML, we don't care... we abuse pgp/inline here. + hdr.SetContentType("text/plain", nil) part, err := w.CreatePart(hdr) if err != nil { @@ -95,7 +96,7 @@ func writeCustomTextPart( return nil } -// writeCustomTextPart writes an armored-PGP data part for an attachment that couldn't be decrypted. +// writeCustomAttachmentPart writes an armored-PGP data part for an attachment that couldn't be decrypted. func writeCustomAttachmentPart( w *message.Writer, att *pmapi.Attachment,