<![CDATA[ Goodnews fails to send - MODX Community Forums]]> https://forums.modx.com/thread/?thread=104664 <![CDATA[Goodnews fails to send]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562924
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
]]>
omegerard Nov 26, 2018, 07:40 AM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562924
<![CDATA[Re: Goodnews fails to send (Best Answer)]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-563285
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>
]]>
omegerard Dec 17, 2018, 09:02 AM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-563285
<![CDATA[Re: Goodnews fails to send]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-563278
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>
]]>
omegerard Dec 16, 2018, 10:35 AM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-563278
<![CDATA[Re: Goodnews fails to send]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562964
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>
]]>
omegerard Nov 28, 2018, 12:11 PM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562964
<![CDATA[Re: Goodnews fails to send]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562956
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>
]]>
omegerard Nov 27, 2018, 05:36 AM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562956
<![CDATA[Re: Goodnews fails to send]]> https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562951
<siteurl>/assets/components/goodnews/crown.php

Does it sein mails then?]]>
gadgetto Nov 26, 2018, 08:21 PM https://forums.modx.com/thread/104664/goodnews-fails-to-send#dis-post-562951