Communications emails not sending

I have dev site with a number of email triggers setup. They were all tested and working fine, but now they have stopped being triggered.

I can use the send to me function to send a test to wp admin - works fine. On signup the user gets the wordpress username/password email - works fine, but the immediately on signup emails do not trigger at all.

I have tried deactivating and reactivating, I have also setup new emails, but nothing will trigger them.

Any ideas? The only thing to have changed in the dev environment from the previous successful tests is that it has moved onto a secure address for final testing as the live site will be secure too.

Thanks

  • Jody
    • Flash Drive

    Hi, I'm good thanks, hope this finds you well and thanks for the very quick reply :slight_smile:

    This has been added to wp-config.php in order to provide ssl support:

    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    $_SERVER['HTTPS']='on';

    as has:

    define('FORCE_SSL_LOGIN', true);
    define('FORCE_SSL_ADMIN', true);

    It's on a client's cloud server which I have very limited access to unfortunately. It is using a load balancer for ssl though, i know that :slight_smile:

    Nothing else I can think of, could it be that?

  • Jody
    • Flash Drive

    I have traced this back to the wp-cron as you suggested. It seems to be related to the SSl certificate:

    "There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron jobs on your site may not work. The problem was:
    SSL: certificate subject name '*.xxxx.co.uk' does not match target host name 'xxx.com'"

    It is very odd because the SSL cert is all working correctly everywhere else and is set to the correct domain, any ideas?

  • Jody
    • Flash Drive

    For anyone else having a similar issue, it appears to be that the version of Curl on the web server that is requesting the wp-cron.php is not high enough to support SNI.

    If you leave this thread open I will post our fix, but I suspect it is going to involve changing wp core until the web server is updated (if it ever is)

  • Jody
    • Flash Drive

    Hi

    It was the server issue, not a high enough version of curl. To resolve it we changed the wp core (not recommended, but no choice in this case!). The following fixed it:
    wp-includes/class-http.php - around line 1277 - commented out the core and set the verify host and peer to false:
    commented out:
    //curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false );
    //curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
    new:
    curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
    curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );

    Thanks for the point in the right direction, this is resolved :slight_smile:

  • PlanetWaves
    • Site Builder, Child of Zeus

    Hi there. We seem to be having the same issue. We made the suggested changes as follows with no results in file class-http.php
    : // curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false );
    // curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
    curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
    curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );.
    What else should we look at?
    Our wp-cron by default runs once in 2 mins now its run once in 15 min

    • Tyler Postle
      • CGO

      Hey PlanetWaves,

      Hope you're doing well today! Thanks for the question.

      So, just to make sure - the emails that are manually triggered send fine? The ones that are scheduled don't? Let us know :slight_smile:

      Also, would you mind creating a new thread for this? Since the solution that resolved this thread didn't work for you, your issue may be unrelated to the original posters. You can always link back here for reference though!

      All the best,
      Tyler

      PS. You can answer the questions I asked above in the new thread - will keep things more organized so we can provide more efficient support for you :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.