Subject: | Tweak for Gmail |
Date: | Mon, 24 Oct 2016 12:31:26 -0400 |
To: | bug-Mail-GnuPG [...] rt.cpan.org |
From: | Juan Camacho <jcamacho [...] twst.com> |
I made a small change so that Gmail can correctly display the encrypted email and the Mailvelope Chrome/Firefox plugin can decrypt the plain PGP text. I don’t know if making this change is desirable or appropriate, but I would like to request a better way to inherit from Mail::GnuPG so I can override how the attachments are done. Currently, I had to take a sledgehammer approach and overrode the entire _mime_encrypt private method as a temporary solution.
--- /home/twst/perl5.bak/lib/perl5/Mail/GnuPG.pm 2016-10-24 12:09:22.712935938 -0400
+++ /home/twst/perl5.bak/lib/perl5/Mail/GnuPG.pm.orig 2016-10-24 12:08:56.648646216 -0400
@@ -932,11 +932,11 @@
$entity->attach(Type => "application/pgp-encrypted",
Disposition => "inline",
+ Filename => "msg.asc",
Data => ["Version: 1",""],
Encoding => "7bit");
$entity->attach(Type => "application/octet-stream",
Disposition => "inline",
- Filename => "encrypted.asc",
Data => [@ciphertext],
Encoding => "7bit”);
Thanks,
Juan Camacho
Message body not shown because it is not plain text.