emersion/go-pgpmail

writer creates multipart MIME messages without the MIME-Version header

konimarti opened this issue · 3 comments

MIME messages must specify the MIME-Version header at the top level of the message to be compliant with the rfc. However, the writer sets only the multipart MIME types, not the MIME-Version.

Users could set the MIME-Version in the header that is passed to pgpmail. But most are not aware of this. It would be helpful if pgpmail would set the MIME-Version directly.

Would it make sense to set the MIME-Version in the writer?

I'm not sure. pgpmail is supposed to only add PGP-related header fields, not other arbitrary header fields.

Hm, that's a good point… And actually, with the examples in the repo, a MIME-Version header field will be added to the encrypted header, which isn't very nice...

I'm not sure what's the best way to fix this issue, but re-opening because I agree it's a valid concern.