aboutsummaryrefslogtreecommitdiffstats
path: root/app/compose.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/compose.go')
-rw-r--r--app/compose.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/compose.go b/app/compose.go
index 43ca6610..a54f534b 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -945,6 +945,14 @@ func (c *Composer) WriteMessage(header *mail.Header, writer io.Writer) error {
}
}
+ if header != nil && !header.Has("MIME-Version") {
+ // sign and encrypt will create multipart/* messages
+ // without setting the MIME-Version header. Set it
+ // manually at the top level to be compliant with RFC
+ // 2045.
+ header.Set("MIME-Version", "1.0")
+ }
+
if c.encrypt {
rcpts, err := getRecipientsEmail(c)
if err != nil {