eNewsletter Cron not working

Trying to send newsletters via the Cron, but it doesn't seem to send. It ends up in the "Waiting" , and doesn't even work even when the cron is manually invoked. Please check the chat notes for more info.

  • Adam Czajczyk
    • Support Gorilla

    Hello John

    I hope you're well today and thank you for getting in touch with us!

    I have accessed a staging site and did some testing on it but I'll now need to ask you to continue one test on a live site. Let me explain first :slight_smile:

    On a staging site I have enabled WP debugging (with logging to the debug.log file) and kept triggering WP cron manually repeatedly, while keeping an eye on the debug.log and the Cron Events list ("Tools -> Cron Events" provided by WP Crontrol plugin).

    I found out that pretty much all the cron events that were listed there, were "stuck" with a PeepSo Email Digest even permanently on top of the list, on first position. At the same time the debug.log showed a "WP Database Error" being a result of some code executed by the PeepSo Email Digest cron event.

    Log story short: that suggests that wherever this event is first in the queue, it causes a DB error and is not able to "fall back gracefully", thus blocking further execution of the cron even. Upon each next cron run, the event - not completed - is still the first in the queue so it gets in a sort of "infinite loop".

    Now, since it's not quite possible for me to keep triggering cron manually indefinitely, I had to switch on to the production (live) site. I didn't do any changes there but "Cron Events" page showed that there's the very same symptom there with that event being "stuck" in the queue. So, not making any other changes, I have temporarily disabled PeepSo Email Digest plugin and then simply started browsing around the site for some time.

    At the same time I was watching Cron Events and they started to be executed. There's quite a lot of them to cycle and it will also take multiple WP Cron runs to get all the queued E-NEwsletter and other tasks fully completed to make it all "up to date" so I still can't say whether the newsletter got send (the test group is "in the end of the sending queue"). That's when I'd like to ask you for a little help:

    I have enabled the PeepSo Email Digest plugin back on site as I didn't want to do any permanent changes to your live site but it would be great if you could actually disable it again and then just wait - possibly a couple of hours if there's a decent traffic to the site - and see if those Newsletters got actually sent.

    Would you please do this and let me know about results?

    Best regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi John,

    I've updated your staging site to do some comparison and the cron job is working there fine right out of the box, without the need to disable PeepSo or any other plugin.

    What could be going on here is that a plugins that are no longer connected on staging site after the transfer (like JetPack) are the ones causing the issue here.

    Can you go to your staging site now and connect all of the plugins that have any kind of external connection and then give it another try with test newsletter and see if it works after that so we can see if that's indeed the case here?

    Best regards,
    Predrag

    • John
      • Design Lord, Child of Thor

      Hello,

      As far as I know Jetpack is the ONLY plugin the has external connections? I tried accessing the staging site and I cant get access. I have screen captured what is shown to me and the only thing I can see regardless of what I do.

  • Predrag Dubajic
    • Support

    Hi John,

    Staging sites are protected with HTTP Auth and you can get the login details by going to Hosting panel on our site, manage your site in question and in Staging tab you will see login details on the right side.

    When you visit your staging site you should see a popup like this where you can enter those login details:

    If you don't see it, try clearing your browser cache or open staging site in a different browser.

    As far as I know Jetpack is the ONLY plugin the has external connections?

    I wasn't referring strictly to connections, some plugins "unlock" specific functions only when they are connected and it's possible that that additional functionality is affecting cron itself, not the actual connection.

    Best regards,
    Predrag

  • John
    • Design Lord, Child of Thor

    Well got logged in and jetpack is connected in safe mode and as for other plugins not sure what else would be unlocked? I know the google recpatcha is not working its complaining of wrong domain other than that know idea.

  • Predrag Dubajic
    • Support

    Hi John,

    I'm not completely sure as you have almost 50 plugins active and I'm not familiar with most of them.
    Could you perform a quick conflict test on live site so we can see if this is indeed caused by any of them?

    You can go to Hosting panel and in Tools tab enable password protection so that the users are not greeted with a broken site.
    Go to Backups tab and create a backup of your site.
    After that disable all of the plugins except for e-Newsletter and send out a new newsletter via cron to see if it works.

    If it works that means that we're indeed dealing with a conflict test and you can activate the plugins one by one until you find a culprit.

    Once the test is done you can easily restore to your backup to get the site to the exact same state as before the test and disable password protection.

    Best regards,
    Predrag

  • John
    • Design Lord, Child of Thor

    Ok so I just don't know. Last week I sent out the weekly newsletter with no problems. This week it never sent out. So I just went and spent an hour or so made a backup and disabled everything but the enewsletter actually disabled that as well and enabled it again just because it still wasn't sending. So everything but enewsletter disabled still can not get the thing to send. Eventually I restored backup and as soon as I restored backup the newsletters started sending. Makes absolutely not since at all. I have no clue at this point.

  • John
    • Design Lord, Child of Thor

    Still cant get this thing to work. My business model really relies on regular newsletters to keep my audience in the loop. If you do not believe you can find the reason this plugin isnt and wont stay working please just let me know so I can search for another one that will work for getting the company newsletters out. Please and thanks.

  • John
    • Design Lord, Child of Thor

    I really need to deliver my newsletter. I created it on the site no go so last I heard from you guys was it worked fine on the staging site so I thought what the heck just try and send it for now via the staging site. Well not only is it NOT sending on the staging site the staging site says wp-cron isnt working with this error:

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was:
    Unexpected HTTP response code: 401

    So there goes that. I now have the same newsletter queued on both the site and staging site.

  • Predrag Dubajic
    • Support

    Hi John,

    Apologies for the long delay here, we had a large number of questions and we deal with tickets from oldest response to newest so your ticket was pushed at the end of the queue with each response.

    So at one point the e-Newsletter worked fine but then again stopped, then you restored the backup from the time it worked at and then it again sent for some time, is that correct?

    Can you tell me which backup is that you restored so we can see if there's anything in there that could tell us what happened?

    I checked with our sysadmins and the cron jobs are configured correctly and per WP CLI logs each cron event was called, so that part seems to be working fine.

    Best regards,
    Predrag

  • John
    • Design Lord, Child of Thor

    Well technically no it did not send and still hasn't sent. I received two newsletters when I wrote that update and after that update was posted and those two newsletters received no more were sent out. That was it two newsletters to me only and I don't even know which sent it the live system or the staging site. So still completely broken.

  • Predrag Dubajic
    • Support

    Hi John,

    We did a couple more tests on our end trying to replicate this but we still don't have any information what could be causing it.
    I'm not sure if the CPU usage can be the cause here but I do see that you had some spikes in CPU usage so I have created a detailed report for our devs and sysadmins to check it further and hopefully they will be able to see what is going on.

    Best regards,
    Predrag

  • John
    • Design Lord, Child of Thor

    Hi there,

    Couples days short of a weeks since you sent this still no word. Haven't got a newsletter out in a month may be longer. My site visits are down 64% my online adverting revenue stats are down about as much and my physical traffic has dropped. Constant contact is essential so please anyone here know what's going on and how to fix it, yet? Can we just do an external cron event??

  • Panos
    • SLS

    Hi John !

    This seems to be related to either port or some of the options set in SMTP settings as I see the phpmailer response is :
    {"error":"RCPT not accepted from server","smtp_code":"550","smtp_msg":"Please turn on SMTP Authentication in your mail client...

    Could you contact your mail client for more info on which values you need to change? I have added a temporary log file that should log those responses. That file's path is:
    wp-content/mu-plugins/newsletter-debug-2.log

    Kind regards!

    • John
      • Design Lord, Child of Thor

      Hello,

      I created a brand new email account JUST for the newsletter and saved it for what its worth the ONLY version that would work is non secured; The SSL/TLS would not work via the newsletter client even though I can use that on my mail clients such as phone or computer. Never the less I can send a test email to the server just fine. I ran the cron event manually and I am seeing what you are seeing as well it is processing the emails here is the error:

      [{"error":"RCPT not accepted from server","smtp_code":"550","smtp_msg":"Please turn on SMTP Authentication in your mail client. 3x.wpmudev.host\r\n550-(club3x.org) [167.99.62.126]:45812 is not permitted to relay through this\r\n550 server without authentication.\r\n"}] So it seems the mail server is rejecting the emails because the client does not have email authentication turned on. However, the client IS THE NEWSLETTER PLUGIN and I do not see any options in the configuration for the outgoing smtp settings to enable this. So it seems the client/newsletter plugin it's self is NOT authenticating outbound processed emails with the smtp server!?!

  • Adam Czajczyk
    • Support Gorilla

    Hello John

    I just looked into newsletter plugin settings on your site again and tried to send test message too. It does, indeed, say it's successful - I understand that you can confirm that this test message is in fact delivered to your account, is that correct?

    The message that you're getting does, just like Panos mentioned before, suggest that it's either a blocked port (SMTP is set to port 26 in plugin configuration currently) or that the smtp server does require additional authentication - it's not about plugin being able to "login" into it; it does login but is denied to "relay" message which means that SMTP server is not allowing transporting the message further.

    That might mean that SSL or TLS must actually be enabled or that host (wpmu dev) must be "whitelisted"/allowed somewhere in SMTP settings or that e.g. there's some sort of additional authentication (like with Google SMTP which now cannot be used with the plugin if it's got Two Factor Auth enabled).

    I see that your smtp server is in the same domain as your site (just on subdomain) so I'm assuming your mails are still hosted with your previous/other host, right? Would you mind telling me what's the host (that sometimes might give some additional clue)?

    Best regards,
    Adam

  • John
    • Design Lord, Child of Thor

    Test messages are an have always been successful without issue. Curranty all the pending new letters have been delivered so I am not sure which or what has happened to all that to happen. Port 26 is right on the port. I can not get SST OR TLS TO authenticate via the plugin at all. Others devices yes.

    Yes emails are still going out our old hosting provider and they are arvixe hosting.

  • Adam Czajczyk
    • Support Gorilla

    Hi John

    Thanks for your resonse!

    As for those pending newsletters being already delivered. Could you please look into the source code of some example message from these newsletters? You should see there the real "from" address and servers "on the way" (in message header - most e-mail clients should let you look into it). I'm asking about this because I'm wondering if these message did indeed go through the designated SMTP server...

    According to Arvixe "knowledge base" the SMTP port should be 465 (which is quite a standard setting), assuming that this is up to date information - it's old but such things rarely change - and that the port wasn't customized in some way:

    https://support.arvixe.com/index.php?/Knowledgebase/Article/View/140/2/do-you-support-secure-smtp-pop-and-imap

    I would suggest giving it a try anyway, as you can always get back to current settings if that doesn't help.

    Also, the newsletter plugin only provides the most basic SMTP feature and since it's no longer developed there are no changes for this planned so if above doesn't help, it might be worth to try something else: switch the plugin back to default e-mail transport in options and use some external SMTP plugin to push all WP mail messages through SMTP.

    Kind regards,
    Adam

    • John
      • Design Lord, Child of Thor

      The DELIVERED newsletters came from the staging site here is the header info so I have no idea why they worked now but wouldn't before from staging and not from production and where did the newsletters go from the production server as well?

      Return-Path: <bounce@club3x.org>
      Delivered-To: admin@club3x.org
      Received: from dallas151.arvixeshared.com
      by dallas151.arvixeshared.com with LMTP id qPEWIm3RMV08uA8A8a/FKA
      for <admin@club3x.org>; Fri, 19 Jul 2019 10:19:25 -0400
      Return-path: <bounce@club3x.org>
      Envelope-to: admin@club3x.org
      Delivery-date: Fri, 19 Jul 2019 10:19:25 -0400
      Received: from 3x.wpmudev.host ([167.99.62.126]:33442 helo=club3x.org)
      by dallas151.arvixeshared.com with esmtpa (Exim 4.91)
      (envelope-from <bounce@club3x.org>:wink:
      id 1hoTjJ-004KYn-DZ
      for admin@club3x.org; Fri, 19 Jul 2019 10:19:25 -0400
      Date: Fri, 19 Jul 2019 14:19:25 +0000 +0000
      To: admin@club3x.org
      From: Club3X <admin@club3x.org>
      Subject: Club3X Cook Out Saturday!
      Message-ID: Newsletters-1-125-152875af90135406d3fa82f488164f0b
      X-Priority: 3
      X-Mailer: Newsletters-1-125-152875af90135406d3fa82f488164f0b
      MIME-Version: 1.0
      Content-Type: multipart/alternative;
      boundary="b1_fb27394f3b49b3b4324faa11217d5e24"

      --b1_fb27394f3b49b3b4324faa11217d5e24
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit

      I cant get the 465 to work because the required ssl tls login wont work with this plugin for some reason.

  • Panos
    • SLS

    Hi John ,

    I tried sending some testing emails using the same function used in the cron schedule. The snippet for that is in a mu-plugin :
    wp-content/mu-plugins/temp-tests.php
    Currently it's renamed to temp-tests.php.off so it doesn't load. In case you want to test it out let me know so I could share instructions, else you an simply delete that file.

    About the error message mentioned above, the message is for Authentication, but the error code, 550, is usually used for different issue (either non existing email address or being blocked). You could ask from you smtp server support to provide more info about the error code.

    Probably might have to do with Authentication, as the error code is possible to be used differently in each server. From plugin's side there isn't anything more that can be done about authentication. It uses PHPMailer and sets all requirements:
    1. $mail->IsSMTP()
    2. $mail->CharSet = 'UTF-8';
    3. mail->Host
    4. $mail->SMTPAuth to true when smtp_user options is set
    5. $mail->Username, if auth is set
    6. $mail->Password, if auth is set
    7. $mail->Port
    8. $mail->SMTPSecure to 'ssl' or 'tls'
    Then subject and content

    From that point on it's up to PHPMailer so not up to plugin, but something in either the config or in the smtp Server's config.

    One last thing, from a look I had on your site just now, I see that the cron list only contains 4 emails not sent, I remember that there were much more there last time I checked. Not sure if there was something changed in settings or on server. What Adam mentioned about using WordPress' wp_mail with a 3rd party SMTP plugin makes sense to me, so next time you get this issue you could also try that suggestion too.

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.