We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22197
    • 40 Posts
    Hi

    Goodnews has been functioning quite smoothly for the past three+ months now. It has sent some 20 mailings (one each week) to 700 recipients.

    Yesterday's mailing was not sent though and I cannot find a reason why. Even if I turn debugging on, the logs don't show anything.

    All I know is that the mails do not arrive at the mailserver, or to be more precise: they are not processed by the server.

    Where to look for a solution to this problem?

    Ludo Vangilbergen

    This question has been answered by omegerard. See the first response.

      • 10378
      • 375 Posts
      What happens if you try to load con.php directly in browser:

      <siteurl>/assets/components/goodnews/crown.php

      Does it sein mails then?
        Freelancer @bitego http://www.bitego.com
        ---
        GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
        More infos here: http://www.bitego.com/extras/goodnews/
        • 22197
        • 40 Posts
        It does! Thanks.

        But could you explain why this is the case?

        The cron-job is running fine. The access log has a reference every minute.


        Quote from: gadgetto at Nov 26, 2018, 08:21 PM
        What happens if you try to load con.php directly in browser:

        <siteurl>/assets/components/goodnews/crown.php

        Does it sein mails then?</siteurl>
          • 22197
          • 40 Posts
          The cron proces was defined on an external server (cron-job.org as suggested in the documentation). That worked fine until last week.

          I tried to replace it with a modx cronjob - via a snippet, but that does not work either.

          As far as I remember, I haven't changed anything. So, I don't understand why the automatic proces has stopped working. And, more importantly, I'd like to repair it. Where do look for clues?

          Ludo


          Quote from: gadgetto at Nov 26, 2018, 08:21 PM
          What happens if you try to load con.php directly in browser:

          <siteurl>/assets/components/goodnews/crown.php

          Does it sein mails then?</siteurl>
            • 22197
            • 40 Posts
            In my case (modx 2.6.5 / goodnews 1.5.1-pl2) cron.php appears to behave differently depending on whether it is run from the address bar or from cron.

            Line 94 makes the difference
            $mailingsToSend = $modx->goodnewsmailing->getMailingsToSend();
            


            When run from cron, the array is empty even if there is a mailing to send.

            If I run the cron command in the address bar, the array is not empty.

            Why the difference?

            Quote from: gadgetto at Nov 26, 2018, 08:21 PM
            What happens if you try to load con.php directly in browser:

            <siteurl>/assets/components/goodnews/crown.php

            Does it sein mails then?</siteurl>
            • discuss.answer
              • 22197
              • 40 Posts
              Hi

              I replaced line 43

              $modx->initialize('mgr');
              


              with

              $modx->initialize('web');
              


              And that solves (for me at least) the problem.

              Ludo


              Quote from: omegerard at Dec 16, 2018, 10:35 AM
              In my case (modx 2.6.5 / goodnews 1.5.1-pl2) cron.php appears to behave differently depending on whether it is run from the address bar or from cron.

              Line 94 makes the difference
              $mailingsToSend = $modx->goodnewsmailing->getMailingsToSend();
              


              When run from cron, the array is empty even if there is a mailing to send.

              If I run the cron command in the address bar, the array is not empty.

              Why the difference?

              Quote from: gadgetto at Nov 26, 2018, 08:21 PM
              What happens if you try to load con.php directly in browser:

              <siteurl>/assets/components/goodnews/crown.php

              Does it sein mails then?</siteurl>