fabacab/wp-pgp-encrypted-emails

Email recipients can only be addresses of WordPress users

p7996619 opened this issue · 5 comments

I'm not exactly sure if this is a bug or desired behavior.
I'd like to be able to send encrypted emails to different addresses than those saved for a specific WordPress account. e.g. I use Contact Form 7 and would like to send all emails from a specific form to an email address reserved for this purpose - e.g. forms@domain.com. This address would be different from the admin or any user email.
Previously I assumed that this is already possible, and that the admin settings are a default for all outgoing emails if not specifically configured for a user.
I think it's a valid use case especially when using forms, so I already made the necessary changes for my installation, but I'd like to submit a PR if this fine with you.

Sounds like you did a lot of unnecessary work. I already do this in my installs and I just made a new WP user account and gave that user account the email address and PGP key I want to encrypt to.

I guess I'm not sure what the point of not doing this would be.

Yeah, didn't think of that, but actually it wasn't much work - merely changed one if-statement.

I think the point would be to not send emails unencrypted when the user may expect all emails going out encrypted. I took it that way from the readme:

[...](i.e., any email sent via WordPress's built-in wp_mail() function)[...]

The best solution to this would probably be something along the lines of issue #19. Other than that I believe it would be reasonable to default to encryption with the global key.

If you're interested you can take a look at my changes here:
p7996619@cbbfb21#diff-b3b2cfd548031d8e198e5979ea32431a

Thanks

I won't have the plugin default to sending encrypted emails for addresses not associated with a WordPress user account because I fear the amount of support requests this would generate to me would be unbearable. I already maintain dozens of other plugins where users don't RTFM, and it's a frustrating burden. If you're interested in implementing #19, I'd be thrilled to merge that, and to have the default encryption key be the one set for the admin's, but this behavior needs to be a user-settable option that is off by default.

Ok, very understandable. I too have a few other projects I'm working on right now, but I'd like to implement #19 some time.

No worries. Implementing #19 would be appreciated whenever it happens. :)