Improvements to generating PGP/MIME messages