Title: Encrypt e-mail attachments
Last modified: August 31, 2016

---

# Encrypt e-mail attachments

 *  Resolved [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/)
 * I use WP PGP Encrypted Emails not least because I want to encrypt messages visitors
   send me using a contact form (I use Contact Form 7 for that).
 * When I enable file upload and attachment in Contact Form 7, the message is encrypted
   but not the attachment. Is there a way to encrypt attachments?
 * [https://wordpress.org/plugins/wp-pgp-encrypted-emails/](https://wordpress.org/plugins/wp-pgp-encrypted-emails/)

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/encrypt-e-mail-attachments/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/encrypt-e-mail-attachments/page/2/?output_format=md)

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083838)
 * That is a good question. The previous library I was using did not support this,
   but I have just switched to using OpenPGP-PHP and I’m unsure if that library 
   can do this, so [I have asked on their project’s issue tracker](https://github.com/singpolyma/openpgp-php/issues/21).
   I will let you know what I find out.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083840)
 * Encrypted attachments are not yet supported by the library but there is a possibility
   that this will be added in the future. Since I am homeless and do not have a 
   reliable income, I cannot prioritize adding this at the moment but it is a good
   feature request, so [I’ve added it to my own issue tracker](https://github.com/meitar/wp-pgp-encrypted-emails/issues/4).
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083946)
 * Thanks, Meitar. I’ll disable file upload in my contact forms until there is support
   for encrypted attachments.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083947)
 * Sounds prudent. FWIW, we are making progress on both [automatic signing](https://github.com/meitar/wp-pgp-encrypted-emails/issues/1)
   using a key your website can generate for itself, and [encrypted/signed attachment support](https://github.com/meitar/wp-pgp-encrypted-emails/issues/4),
   and will hopefully have both features ready in the next minor point release. 
   🙂
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083948)
 * Nice… Thanks for your great work!
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083971)
 * Stefan, can you give me more information about what your attachments are? It 
   turns out this may be possible but will be tricky because WordPress does not 
   support adding “string attachments” directly using PHPMailer (which is what `
   wp_mail()` uses under the hood).
 * I am trying to get encrypted attachments to work anyway, but in order to make
   them work reliably for other plugins, too, I need more information about what
   the other plugins’ calls to `wp_mail()` look like.
 * Thanks!
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083975)
 * Hi again Stefan. We have made some more progress and now have an experimental
   branch that has (very rudimentary) support for automatically-encrypted attachments.
   Please have a look at the comments on [this GitHub issue](https://github.com/meitar/wp-pgp-encrypted-emails/issues/4#issuecomment-190652594)
   for an update.
 * Also, can you please manually install [the patched code from the experimental branch](https://github.com/meitar/wp-pgp-encrypted-emails/archive/issue-4.zip),
   replacing your current WP PGP Encrypted Emails plugin with it, and let me know
   if the attachments your Contact Form 7 plugin get encrypted before transit?
 * Thanks for your help.
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083985)
 * Meitar, sorry for my late reply. The website is for a textile printing workshop,
   so people usually want to attach pictures (usually PNG, JPG, sometimes PDF, EPS
   or SVG).
 * I’m really sorry but I have no time for testing right now.
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083987)
 * OK, I wanted to test the experimental branch, but it turned out that the plugin(
   version 0.4.1) doesn’t work for me anymore.
 * I can’t use Contact Form 7 to send E-Mails when the plugin is installed – I always
   get error messages when I click the submit-button. It makes no difference if 
   I install 0.4.1 or the patched code from the experimental branch…
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083988)
 * > I can’t use Contact Form 7 to send E-Mails when the plugin is installed – I
   > always get error messages when I click the submit-button.
 * Can you be more specific?
 * I tried using Contact Form 7 on my test install with WP PGP Encrypted Emails 
   and it worked without a problem. :\
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083989)
 * With WP PGP Encrypted Emails installed, when I submit a message with Contact 
   Form 7 I get the error message “Sender’s message failed to send” – however I 
   still receive the message.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083991)
 * Okay, I know why that’s happening, will track it [here](https://github.com/meitar/wp-pgp-encrypted-emails/issues/10).
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083994)
 * Stefan, can you try re-installing with [this patched version](https://github.com/meitar/wp-pgp-encrypted-emails/archive/252e0dcb7780f40892b0c5968913e8895206ec1a.zip)
   and let me know if the issue persists?
 * This patch will try to ensure a “success” response is returned to Contact Form
   7, but will still encrypt the messages to recipients as before.
 *  Thread Starter [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * (@stefannagy)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083995)
 * With the patched version I get no error message after submitting the message 
   with Contact Form 7. But I get two e-mails to my admin-address:
 * Before receiving the E-Mail sent with Contact Form 7 I get a “Undelivered Mail
   Returned to Sender”-Mail which contains the following in the attached Delivery
   report:
 * Final-Recipient: rfc822; [wordpress@localhost.invalid](https://wordpress.org/support/topic/encrypt-e-mail-attachments/wordpress@localhost.invalid?output_format=md)
   
   Original-Recipient: rfc822;wordpress@localhost.invalid Action: failed Status:
   5.4.4 Diagnostic-Code: X-Postfix; Host or domain name not found. Name service
   error for name=localhost.invalid type=A: Host not found
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/#post-7083996)
 * Boo. I was hoping all MTAs would be smart enough to not actually try to send 
   an email to an [RFC 2606](https://tools.ietf.org/html/rfc2606) `.invalid` domain.
 * What does your system’s MTA set up look like?

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/encrypt-e-mail-attachments/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/encrypt-e-mail-attachments/page/2/?output_format=md)

The topic ‘Encrypt e-mail attachments’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-pgp-encrypted-emails.svg)
 * [WP PGP Encrypted Emails](https://wordpress.org/plugins/wp-pgp-encrypted-emails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-pgp-encrypted-emails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-pgp-encrypted-emails/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-pgp-encrypted-emails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-pgp-encrypted-emails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-pgp-encrypted-emails/reviews/)

 * 30 replies
 * 2 participants
 * Last reply from: [Stefan Nagy](https://wordpress.org/support/users/stefannagy/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/encrypt-e-mail-attachments/page/2/#post-7084015)
 * Status: resolved