Giter VIP home page Giter VIP logo

fabacab / wp-pgp-encrypted-emails Goto Github PK

View Code? Open in Web Editor NEW
37.0 8.0 10.0 1.14 MB

:closed_lock_with_key: :e-mail: Encrypts WordPress emails using OpenPGP or S/MIME with a familiar API.

Home Page: https://wordpress.org/plugins/wp-pgp-encrypted-emails/

License: GNU General Public License v3.0

PHP 96.03% Shell 3.83% CSS 0.14%
openpgp gpg wordpress-plugin security privacy email smime encryption pgp api-wrapper

wp-pgp-encrypted-emails's Introduction

WP PGP Encrypted Emails - OpenPGP and S/MIME encryption for WordPress

Download from WordPress.org Current release at WordPress.org Required WordPress version WP PGP Encrypted Emails is licensed GPL-3.0

A pure PHP WordPress plugin that adds a simple OpenPGP and S/MIME API using familiar WordPress filter hooks.

OpenPGP implementation is based on the OpenPGP.php project. S/MIME support uses the ubiquitous OpenSSL extension for PHP.

Contents

  1. Cryptographic implementation notes
    1. OpenPGP API
    2. S/MIME API
    3. Handling key material
  2. Third-party plugin integrations
  3. Disclaimer and bugs

Cryptographic implementation notes

Beyond merely processing WordPress-generated email automatically (i.e., any email sent via WordPress's built-in wp_mail() function), this plugin also provides an easy-to-use API to cryptographically secure operations for encrypting arbitrary data to protect data-at-rest or data-in-motion intended to be familiar to WordPress plugin and theme developers. This API ensures WordPress developers have ready access to otherwise potentially difficult and obscure mechanisms for protecting user data. My hope is that developers can therefor build more secure, more private coordination and communication tools atop WordPress without needing to become security gurus, themselves.

That said, I am not a cryptographer and have not implemented my own cryptographic routines. Instead, I have taken some pain to find and properly use the best pre-existing, well-vetted, professionally audited, and widely available libraries, packaged them into this plugin, and wrapped them with the aforementioned API. See the class-wp-*.php files in the includes/ directory to see the code itself, or read the rest of this document for an English explanation of the same.

The two encryption schemes provided by this plugin are accessible as the OpenPGP API and the S/MIME API.

OpenPGP API

The OpenPGP API consists of the following WordPress filter hooks:

  • openpgp_key - Turns a ASCII-armored OpenPGP key into a PHP (OpenPGP_Message) object.
  • openpgp_enarmor - Takes a binary OpenPGP datagram and ASCII-armors it.
  • openpgp_encrypt - Encrypts arbitary data with a provided OpenPGP key.
  • openpgp_sign - Signs arbitrary data with a provided OpenPGP key.
  • openpgp_sign_and_encrypt - The equivalent of doing both openpgp_encrypt and openpgp_sign.

See the "Other Notes" section in the user-facing readme.txt for usage details.

These filters are registered with WordPress during the init action hook. This means you cannot use them until after various WordPress start-up routines have completed, so that you have access to WordPress's security-related functions such as wp_salt(). You are encouraged to learn about and use these in conjunction with this API, if you so wish.

The WP PGP Encrypted Emails plugin uses this same hook system itself, which means any third-party code running in your WordPress install can hijack these routines. That's useful for plugin developers—for example, you can use this to inspect data as it is openpgp_enarmored if you call openpgp_sign—but means you are responsible for ensuring hooked functions do not molest your private data. Then again, if you have malicious PHP code running on your server, you are already totally pwned. :(

The OpenPGP implementation uses this OpenPGP.php library, which by itself does not enforce best practices. So, while you can use that library directly after requiring this plugin, you are strongly encouraged to use the above API instead. The reason is because this API wraps the OpenPGP.php library calls and aggressively checks for common mistakes or outdated practices, throwing errors and generally making a fuss if you do not pass sensible values to the library underneath.

For example, while you can theoretically generate an RSA keypair of any bitlength, contemporary wisdom generally holds that bitlengths fewer than 2048 are not secure. Therefore, the API throws an UnexpectedValueException and immediately errors out if you try to use this API to generate unacceptably weak keys.

Similarly, there are many pitfalls and "gotchas" when implementing your own encryption schemes. Using this plugin's API, you are protected from common mistakes such as encrypting signed data instead of signing encrypted data. (The order of operations is significant.) Using the API's openpgp_sign_and_encrypt filter hook alleviates this concern. Similarly, using openpgp_enarmor avoids some rather obscure (and annoying) compatibility problems as it is written to strictly follow the OpenPGP Message RFC.

S/MIME API

The S/MIME API consists of the following WordPress filter hooks:

  • smime_certificate - Retrieves a usable PHP resource of type OpenSSL X.509 from some appropriately-formatted data.
  • smime_certificate_pem_encode - Converts an OpenSSL X.509 resource into a PEM-encoded string.
  • smime_encrypt - Performs the actual encryption given a message and an user's certificate.
  • smime_pem_to_der - A convenience function to convert a PEM-encoded object to its (X.690) DER equivalent.

Again, see the "Other Notes" section in the user-facing readme.txt for usage details.

As with OpenPGP, these filters are registered with WordPress during the init action hook, but only if PHP has access to the OpenSSL PHP extension, since this API provides a wrapper around its functions. The important operation here is, of course, smime_encrypt. You are strongly encouraged to use this filter hook instead of relying on the openssl_* functions directly because doing so enforces best practices and will automatically upgrade to the strongest available cipher modes based on your specific PHP execution environment.

This API uses the openssl_pkcs7_encrypt() function under the hood, but automatically detects and uses non-default options to further strengthen the encryption process. Specifically, it uses OPENSSL_CIPHER_AES_256_CBC if your PHP supports it. It also unconditionally and aggressively overwrites plaintext and even encrypted data storage locations (files) to help ensure no sensitive information remains on the system after encryption regardless of who the caller is.

These additional checks are not always considered by developers intending to perform security-sensitive operations and so, again, you are encouraged to make use of this API instead of rolling your own data encrypting routines.

Handling key material

This plugin makes no additional attempt to protect key material from other running code because its intent is to provide cryptographic "primitives" to be used by other plugins or themes. As such, potentially sensitive key material is stored in easily-accessible places. This is generally fine, because the plugin's interface takes pains to prevent the storage and disclosure of a user's private key material and only accepts public key material. The exception to this is with the site's own "signing key," which is by definition private key material. Even this, however, has additional checks to enforce the use of TLS-secured connections (HTTPS), and the plugin will refuse to export private key material over unsecured (HTTP) connections, even at the expense of user-friendliness for administrative users. (Sorry, not sorry. Get your site using LetsEncrypt as soon as possible.)

🚧 Note that some parts of this enforcement still need a better user interface. :(

A user's key material will be stored as part of their WordPress profile information and is therefore accessible to other running code. However, you are strongly encouraged to use the following WordPress filters provided by this plugin instead of directly accessing the user's metadata.

  • wp_openpgp_user_key - To retrieve the user's OpenPGP public key.
  • wp_smime_user_certificate - To retrieve the user's S/MIME public certificate.

Both these filters automatically invoke the openpgp_key or smime_certificate filters so that they return native PHP objects rather than raw strings. You can then immediately use the results in further operations. This radically simplifies the process from plaintext to successful encryption, as shown here using both schemes:

// Get the key material.
$wp_user    = get_user_by( 'email', '[email protected]' );     // `$wp_user` is now a `WP_User` object.
$public_key = apply_filters( 'wp_openpgp_user_key', $wp_user );       //< The OpenPGP public key for this user.
$smime_cert = apply_filters( 'wp_smime_user_certificate', $wp_user ); //< The S/MIME certificate for this user.

// Compose a message to encrypt.
$message = 'This is a test.';

// Do the encryption.
$pgp_encrypted_message   = apply_filters( 'openpgp_encrypt', $message, $public_key );
$smime_encrypted_message = apply_filters( 'smime_encrypt', $message, array(), $smime_cert ); //< Empty `array()` means no extra MIME-formatted headers.

This way, each WordPress user is able to indicate to you (and your plugin) that they wish to use one (or both) of the secure communication protocols widely deployed today. The API also makes implementing both schemes in your own code effectively identical. All of the differences between OpenPGP and S/MIME encryption are taken care of for you in as secure a manner as I know how.

If you want to support both OpenPGP and S/MIME and a given user has provided both an OpenPGP public key and an S/MIME certificate, you should additionally use the plugin's wp_user_encryption_method filter:

$preferred_method = apply_filters( 'wp_user_encryption_method', $wp_user );
if ( 'pgp' === $preferred_method ) {
    print 'This user preferrs to use OpenPGP.';
} else if ( 'smime' === $preferred_method ) {
    print 'This user preferrs to use S/MIME.';
}

Obviously, if a given user only has an OpenPGP public key, or only has an S/MIME certificate, then use that method to communicate with them since you cannot use the other. ;)

Third-party plugin integrations

It is possible to add custom integrations with popular third-party plugins for your site by adding a file with the name PLUGIN-functions.php, where PLUGIN is the plugin slug for a recognized plugin. This file will be automatically loaded by WP PGP Encrypted Emails during initialization if and only if the plugin is currently active on your site. Your code will then replace the built-in integrations for that plugin shipped with this plugin.

For example, to customize your WooCommerce integration, create a file in your current Theme directory called woocommerce-functions.php. You will need to write your own calls to add_action() and so forth for your code to have any meaningful effect. You can use the integrations shipped with this plugin as a guide.

Disclaimer and bugs

Please email me directly to report security bugs. I am not a professional (in any capacity; see also "I quit, Because Capitalism"). I am just someone who cares about this shit and I'm doing my best, especially given the fact that I am not compensated financially for this work.

Patches, of course, are sincerely welcomed. :) (So are donations.)

wp-pgp-encrypted-emails's People

Contributors

budrick avatar dependabot[bot] avatar fabacab avatar githubuserx avatar rktaiwala avatar samanta815 avatar willhowells avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-pgp-encrypted-emails's Issues

Syntax Error in 0.4.0

OS: SUSE Enterprise Linux 11 SP 3
PHP: 5.3.x
WordPress: 4.4.2
Plugin Version: 0.4.0

I get this error in the logs:

PHP Parse error: syntax error, unexpected '[' in /srv/www/htdocs/wp-content/plugins/wp-pgp-encrypted-emails/class-wp-openpgp.php on line 70

ob_end_flush() failed

The following error message is logged after saving settings:

PHP message: PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /myhome/wp-includes/functions.php on line 3743, referer: https://mysite.com/wp-admin/options-general.php?page=wp-pgp-encrypted-emails

What is more, the email sent is neither encrypted nor signed even though I have entered the public key for the admin address and have generated the key pair from within the plugin.

Conflict where admin email matches user email

If the admin address belongs to a registered user and the user only puts their public key in their user profile, the plugin won't find it - it will check the admin setting and skip the user check.

ECC key not supported

Hi,
I use your plugin without problem with an OpenPGP RSA 4096bits key. But i just try to migrate to a new OpenPGP ECC key (X25519 type), and with this public key set in plugin setting for admin, my outgoing mails are not encrypted anymore.
Do you have any information about that ?
Thanks

Admin option to require encrypted sending

I'd be interested in an admin option what would require encryption. If a user or the admin doesn't have suitable credentials, rather than their receiving unencrypted emails, the emails would not be sent.

Problems with Formidable Integration

"Integration" is a strong term here, but this is to follow the Formidable issues I have been having.

Here is the error:

PHP Warning: trim() expects parameter 1 to be string, array given in /srv/www/htdocs/wp-includes/class-wp-user.php on line 201, referer: http://blogs.mlc-wels.edu/bits-to-bytes/test-page/

This was shown using Formidable 2.0.x, WP-PGP-Encrypted-Emails 0.3.0, and WordPress 4.4.2 on SLES 11 SP3.

Silly idea: "private comment" feature to let users write comments visible only to the post author

Not sure if this will be widely used, and ignoring for a moment the obvious security hole in the scheme, it might be fun to let blog commenters tick a box ("Private comment" or something) that will trigger, upon receipt of the comment, the plugin to encrypt the comment content to the public key of the post author, if available. In fact the "Private comment" checkbox should only exist of the post author has a public key in their profile.

No, this will not solve the issue where the plaintext is still transmitted and received by the server, but that's why this is a "silly idea." It would, however, give users the ability to leave a comment in a way that is not visible to the other readers of the post. Why not write the author an email? Maybe the author's email is not known to the reader. shrug

It's a silly idea, but easy to implement and could be a fun flourish for nerds and/or a way to expose non-technical people to seeing a raw PGP message block on the Web a bit more often.

Avoid writing S/MIME plaintext to disk entirely

Two options come to mind:

  • Using /dev/shm/$some_path if the plugin is running in a GNU/Linux environment with a mounted tmpfs as the S/MIME $infile. This would not be portable to, for example, Windows-based servers. We could auto-detect our environment and simply perform the optimization if possible, falling back to the existing implementation if it is not.
  • Using php://memory or php://temp streams and manually constructing the PKCS#7 formatted S/MIME message from strings instead of using openssl_pkcs7_encrypt(), since that function requires file paths. This would be more work but will also be more portable across operating systems.

PHP 8 openssl API changes are not handled

Beginning in PHP 8.0, openssl_* functions return or expect an object of class OpenSSLCertificate rather than resource of type OpenSSL X.509. The S/MIME support class does not as yet adhere to the new contract, and specifically only checks the resource type.

The end result is that valid, present S/MIME certificates are erroneously thought to be either invalid or not present when running with PHP 8.0.

I will submit a PR shortly to fix this, since it's a simple addition to the validation check in class-wp-smime.php.

Send from address other than wordpress@...

I noticed that the generated keypairs are always for the wordpress user at the host's domain, E.g. [email protected]

If the sender address for WordPress is changed using another plug-in, this plug-in's generated keypair does not use the new address, the keypair is always generated using 'wordpress@'. It would be nice to be able to use a different sender address other than wordpress@ like mailer@ or no-reply@ etc.

The plug-in's interface does not display what email ID has been encoded into the keypair. It was found by uploading the public key into a keyserver or examination with GnuPG.

Enhancements:

  1. Display the email ID of the sender used that is encoded in the keypair
  2. Lookup the current sender address before generating the keypair
  3. Enable changing the WordPress sender email address for the system

Can't encrypt text

After trying to encrypt text I get:
"Encryption of the text is not possible. Cannot read property 'toHex' of null" error.

All I'm doing here is trying to send my public key to another email user that may or may not be using mailvelope.

image

Only Admin user has a text area for their public key

This could be a WordPress 5.8.3 issue or an incompatibility with 'Ultimate Member' plug-in.
I looked at the code last night and saw a whitelist for Woo Commerce, does Ultimate Member need to be whitelisted too?

There is no 'Email Encryption' section in user profile pages. Only the Admin account has it.

Admin's profile
AdminHasPGP

User (Subscriber role) profile
SubscriberNoPGP

Protonmail support

Hi!

I read on Reddit that you made it possible to encrypt outgoing emails with Protonmail. Great stuff!

I'm running a webshop with Woocommerce and I want to encrypt all my outgoing messages. Right now I use WP-SMTP as Protonmail doesn't support SMTP for Wordpress, so I was wondering if this plugin will make it happen, and if so, how?

My end goal here is to send encrypted order confirmations to my users and at the same time send them my public key in the order email so that they are able to decrypt the message. Would that be possible?

Emails sent with WS Form not encrypted

WP PGP Encrypted Emails works great out of the box without a lot of configuration for almost all form plugins I've tested. The only one which doesn't encrypt mails is WS Form. My guess is that the code from WS Form is loaded after this plugin (because the plugins are loaded in alphabetical order) and therefore the encryption process won't work.

I know that you can set priorities for WP filters and hooks and tested a bit with the code on a staging site but was unable to make it work. Is anyone familiar with increasing the priority for this plugin?

PHP Fatal error

The curly braces in three files:

vendor/singpolyma/openpgp-php/lib/openpgp_crypt_symmetric.php (lines 125, 612, 628, 771, 1055 and more)
vendor/singpolyma/openpgp-php/lib/openpgp.php (line 218 and more)
vendor/singpolyma/openpgp-php/lib/openpgp_crypt_rsa.php (lines 65, 190 and more)

broke this plugin and produced a fatal PHP error (saying "Array and string offset access syntax with curly braces is no longer supported") on my site running PHP 7.4, breaking the site as well.

I went through and changed the in the files on my install and the plugin worked, but the lines mentioned above are not an exhaustive list. I don't know how common this error is, but thought I should bring it to your attention.

PGP/Mime Support and HTML/Multipart Support

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.

Fatal error - Uncaught Error: Call to a member function setHash()

We've installed your plugin, and everything is ok, we upload the private and public PGP keys, etc.,
but in some occasions (I think that when emails are sent to known people, because we've set that
option as is), appears an error message:

Fatal error: Uncaught Error: Call to a member function setHash() on null in /var/.................../wp-content/plugins/wp-pgp-encrypted-emails/vendor/openpgp-php/openpgp_crypt_rsa.php:126 Stack trace: #0 /var/.................../wp-content/plugins/wp-pgpencrypted-emails/includes/class-wp-openphp.php(70): OpenPGP_Crypt_RSA->sign(Object(OpenPGP_LiteralDataPacket)) #1 /var/.................../ etc, see attached file.
errormsg

Any idea? :)

Fatal error when Email Subscribers plugin attempts to send email to a user with their S/MIME certificate

Via https://wordpress.org/support/topic/accept-also-smime-keys/page/2/#post-9174319:

I have tested the “Email Subscribers & Newsletters” and is giving me a error when sending “Newsletters”.

Fatal error: Uncaught exception ‘Error’ with message ‘Length must be greater than 0’ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php:93 Stack trace: #0 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php(139): random_bytes(0) #1 [internal function]: WP_SMIME::encrypt(‘<strong style=”…’, ‘From: “Admin” <…’, Resource id #297) #2 /www/blog/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array) #3 /www/blog/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘<strong style=”…’, Array) #4 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php(1340): apply_filters(‘smime_encrypt’, ‘<strong style=”…’, ‘From: “Admin” <…’, Resource id #297) #5 /www/blog/wp-content/plugins/ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php on line 93

The e-mail to the webmaster e-mail is send encrypted, the e-mail to the user without S/MIME key is send properly, the e-mail send to the user with S/MIME key set up is not sent.

The same happens when publishing a normal article of the wordpress… and I really mean, I do a normal article on wordpress, but when I publish it to the web site I received the error bellow:

Fatal error: Uncaught exception ‘Error’ with message ‘Length must be greater than 0’ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php:93 Stack trace: #0 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php(139): random_bytes(0) #1 [internal function]: WP_SMIME::encrypt(‘Hello Carina,<b…’, ‘From: “Admin” <…’, Resource id #295) #2 /www/blog/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array) #3 /www/blog/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Hello Carina,<b…’, Array) #4 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php(1340): apply_filters(‘smime_encrypt’, ‘Hello Carina,<b…’, ‘From: “Admin” <…’, Resource id #295) #5 /www/blog/wp-content/plugins/ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php on line 93

“Hello Carina” is probably referring in this case of the user with S/MIME set up on its account.
The other e-mails are sent correctly (encrypted to the admin e-mail, and to the none set up S/MIME user).

And yes the article is published correctly on the web site.

This happens if “Email Subscribers & Newsletters” is active… without it the e-mail notifications can’t be send of course. Disabling the “WP PGP Encrypted Emails” makes it work properly without errors.

Public certificate generated by plugin cannot be imported into several different GPG apps due to userID check failure

First, I apologize if I lack the technical detailed knowledge on the programming or PKI side to fully describe what is happening.

The public certificate generated by the plugin can be imported into into some GPG Keychains (e.g. Mailvelope, Protonmail), and appears to be failing on the userID check. The error is similar to what is outlined here: mailvelope/mailvelope#713

But appears to be related to the certificate versus the keychain, as the issue also happens with Protonmail. My theory is the checksums are being printed incorrectly when the plugin generates the public key. GPG Keyrings that skip/ignore this conflict and focus on other checks import it fine, but any that include checking of the two-bit checksum run into an issue.

It gets out of my league at this point so I'm not sure if it is even possible to find out what is causing an invalid checksum to appear in the public key and correct that so the key can be imported into a wider variety of keychains (or if it's even 100% the problem).

Admin access to other users' keys

Hi,

I needed access to other users' pgp keys in their user profiles.

I modified lines 151 and 152 to enable that as follows:

add_action( 'plugins_loaded', function(){
    if( current_user_can('manage_options') ){
        add_action( 'edit_user_profile', array( __CLASS__, 'renderProfile' ) );
        add_action( 'edit_user_profile_update', array( __CLASS__, 'saveProfile' ) );
    }else{
        add_action( 'show_user_profile', array( __CLASS__, 'renderProfile' ) );
        add_action( 'personal_options_update', array( __CLASS__, 'saveProfile' ) );
    }
});

This would be useful in a future update I'm sure.

Encryption with Contact Form 7 does not to work

Wordpress Version: 5.9.3
Plugin Version: 0.8.0
PHP: 7.4

Configuration:

  • Created fresh keypair on client computer and added the pubkey in the "Admin Email PGP Public Key" and to the admin user profile.
  • Created signing keypair in plugin settings
  • Basic Contact Form 7 form is set up to send everything to the site admin.

Expected results:

  • Admin E-Mail should receive a signed and encrypted E-Mail

Actual results:

  • E-Mail arrives only signed but not encrypted

Research:

  • Here another user in comments at the bottom claims it didn't work for them either in 2019 (no further details though)
  • The plugin version on wordpress.org seems to be still on main branch from May 2021 and i personally can't tell if the develop has changed anything to address this issue but i will try to do some more testing.

Mixed language encoding wrong in Outlook

Original report:
https://wordpress.org/support/topic/multi-language-email-mail-body-encoding-are-wrong-on-outlook/

Issue:

When send a encrypted mixed language to Outlook, the body failed to apply the correct encoding. The encoding type used is SMIME.

Platform:

Tested on Windows 10's Outlook and Outlook for Mac 16.15.

Steps to reproduce:

  1. Add some non-english text to the test message body text from plugin. This is my test message "你好 Allô! This is a test message".
  2. Add SMIME to the user and click "Send me a test mail".
  3. Check the mail in Outlook, the non-english text are not display. Attached with the screenshot and raw source.

    Notice the weird character in front of English text:
    wrong encoding

    The expected result:
    correct encoding

    Here is the raw mail source:
    raw source.txt

Supporting Information:

  1. If send an mixed language mail directly from client to client, eg Mac Mail to Outlook, the encoding do displayed correctly. Enclosed with the client to client mail's raw source.
    raw source - client to client mail.txt

  2. If the mail is unencrypted, Outlook do display correct encoding.

  3. If change the charset via wp_mail_charset filter, only encrypted mail subject reflected the changed charset, mail body do not show any changes at all.

    Notice that the body encoding still the same although I have change the charset:
    charset changed

    This is the changed charset:
    charset

    The raw source for charset changed email:
    raw source - charset changed.txt

  4. If I added utf8_decode to the mail body in the sendTestEmail function, the "ô" in Allô do displayed correctly in Outlook, but the Chinese character get converted into question mark.

    Notice that the "ô" in Allô is displayed correctly:
    screen shot 2018-08-15 at 8 43 45 pm

Email recipients can only be addresses of WordPress users

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. [email protected]. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.