fabacab / wp-pgp-encrypted-emails

:closed_lock_with_key: :e-mail: Encrypts WordPress emails using OpenPGP or S/MIME with a familiar API.
https://wordpress.org/plugins/wp-pgp-encrypted-emails/
GNU General Public License v3.0
39 stars 10 forks source link

PGP/Mime Support and HTML/Multipart Support #25

Open holzhannes opened 7 years ago

holzhannes commented 7 years ago

First of all thanks for this very cool plugin. I noticed messages are PGP/Inline signed and encrypted. It would be nice if it would be possible to have PGP/Mime encrypted/signed mails instead. At the moment the plugin is treating all emails as plaintext mails. Therefore html mails will be signed html sourcecode. With PGP/Mime it is also possible to send encrypted html mails.

fabacab commented 7 years ago

To be blunt, I am unlikely to do the work to support this. I understand that it's possible but I'm not personally motivated to do this because I do not use (or accept) HTML email. I'll very happily merge a pull request to support this, though. Thanks for the suggestions, regardless. :)

holzhannes commented 7 years ago

Thanks for your reply I will check if I can do this and of course create a pull request if I am finished.

fabacab commented 7 years ago

Sure. Let me know if you need any guidance or have questions about the current implementation. I'm happy to help, just not going to take the lead on this feature. :)

belle-isle commented 6 years ago

Quite agree that this would be a needed feature, since in the meantime it renders HTML emails useless and painful.

p7996619 commented 5 years ago

I just discovered that the rendering/decrypting of PGP encrypted HTML mails doesn't work because of the exact same issue as in #31. (tested with Outlook and GpgOL)

As I understand it, the email would still be in PGP/INLINE format after filtering the text/html content type, but that should work with most mail clients/plugins though.

So maybe that is the actual issue that @holzhannes described.

fabacab commented 5 years ago

rendering/decrypting of PGP encrypted HTML mails doesn't work because of the exact same issue as in #31. (tested with Outlook and GpgOL)

Yeah, this is a known issue since currently no support for PGP/MIME is implemented yet. This is distinct from S/MIME entirely and also different than multi-part MIME. Our work so far has focused solely on ensuring proper handling of unmodified MIME header handling, S/MIME multi-part MIME handling, and plain email Content-Type header handling.

PGP/MIME is another chunk of work that should probably have its own branch and work-in-progress pull request.

p7996619 commented 5 years ago

Ok, I think I get it now. The PGP/INLINE body does not contain any mail headers therefore it won't work with HTML emails.

fabacab commented 5 years ago

I get that PGP/MIME is not implemented yet and completely different, but thats actually not what I'm referring to. Even PGP/INLINE does currently not work if the email is sent with text/html content type.

Yes, sorry, I should have been more clear: "HTML email with PGP currently does not work at all, because PGP/MIME is not implemented." So, this is currently the expected behavior. In order for PGP to work with HTML in email, we basically have to implement PGP/MIME. We probably should do that eventually, but I'm not very excited about doing it because I just hate HTML email all together. :\

heinrich-k commented 3 years ago

I would really like if the eMail generated would be of a correct content type: Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";

I thought it was an issue with Thunderbird and opened a bug there. Their analysis is in the Bugzilla tracker https://bugzilla.mozilla.org/show_bug.cgi?id=1722340