awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 35 forks source link

Remove Site Health warning if 'Current mailer: Default (none)' #68

Closed siccovansas closed 4 years ago

siccovansas commented 4 years ago

Just having WP Mail SMTP installed and enabled fixes a some email sending problems for me. So even though I have the 'Default (none)' mailer selected, I don't need any more configuration for the plugin to work for me. Still WP Mail SMTP gives me a warning in the WordPress Site Health screen saying that 'WP Mail SMTP mailer setup is incomplete'. For me the configuration is complete and I would like to see the warning removed are maybe have an option to suppress the warning :)

Expected Behavior

No Site Health warning if you have the 'Default (none)' mailer selected

Current Behavior

A Site Health warning if you have the 'Default (none)' mailer selected

capuderg commented 4 years ago

Hi,

just activating and leaving the plugin mailer setting at "Default (none)" does not change any aspect of sending emails in WP, so it's strange it does for you. That's why we have this site health test, to encourage the users to configure one of the mailers...

What kind of issues do you have with sending emails before you install and activate our plugin?

As for disabling the site health check... Each site health check can be removed via custom PHP code. I think this code below should remove the site health test you are talking about:

add_filter( 'site_status_tests', function ( $tests ) {
    unset( $tests['direct']['wp_mail_smtp_mailer_setup_complete'] );

    return $tests;
}, 15 );

Read this article to learn how to place custom PHP code to your WP site.

siccovansas commented 4 years ago

Thanks for your reply!

If I disable WP Mail SMTP and try to recover my WordPress password I get the following error:

Error: The email could not be sent. Your site may not be correctly configured to send emails. Get support for resetting your password.

I if (network) enable WP Mail SMTP (using the 'Default' mailer) and try to recover my password I have no problems and a password recovery email is sent.

I have no clue how WP Mail SMTP has this effect, but using the 'Default' mailer does change something. Some more info: I've configured the system that runs WordPress to send mails using msmtp.

slaFFik commented 4 years ago

@siccovansas Thank you for additional details, much appreciated.

  1. Could you also describe how your FROM Email setting is configured inside WP Mail SMTP plugin admin area?

  2. (From this point I assume that your domain is example.com). By default, WordPress tries to send emails using wordpress@example.com email address in its FROM header. WP Mail SMTP allows you to reconfigure that. So what's your setting there - something@example.com or not attached to the domain itself?

  3. Do you have any custom MX/TXT/SPF/DKIM records for your domain?

siccovansas commented 4 years ago

Thanks for your help!

I use the following settings in wp-config.php:

define('WPMS_ON', true);
define('WPMS_MAIL_FROM', 'something@example.com');
define('WPMS_MAIL_FROM_NAME', 'Something');
define('WPMS_MAILER', 'mail');

Note that this is a multisite installation of WordPress and the main domain is sub.example.com.

The MX is Google. SPF and DKIM are used yes.

slaFFik commented 4 years ago

So basically changing WPMS_MAIL_FROM setting helps. This is out of the plugin control, and for the majority of our users leaving Default mailer doesn't help much, and this is not reliable, so we can't recommend this option. So for now we won't change this behavior. But I've added a note and we will monitor the performance and effect of this option on other sites.

Thanks for the additional information that you provided!