News:

Wondering if this will always be free?  See why free is better.

Main Menu

Cron error

Started by Sir Osis of Liver, April 21, 2025, 10:04:27 PM

Previous topic - Next topic

shawnb61

A proper link to line 1413 was provided earlier- see reply 4 above.
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

SOoL -
I sub'd a PR to fix this, found here: https://github.com/SimpleMachines/SMF/pull/8610

In ScheduledTasks.php, find this:
// Send the actual email.
if ($notifyPrefs[$row['id_member']] & 0x02)
sendmail($row['email_address'], $emaildata['subject'], $emaildata['body'], null, 'paid_sub_remind', $emaildata['is_html'], 2);

if ($notifyPrefs[$row['id_member']] & 0x01)

Replace with this:
// Check notification prefs.
$subs_notify = isset($notifyPrefs[$row['id_member']]['paidsubs_expiring']) ? $notifyPrefs[$row['id_member']]['paidsubs_expiring'] : 0;

// Send the actual email.
if ($subs_notify & 0x02)
sendmail($row['email_address'], $emaildata['subject'], $emaildata['body'], null, 'paid_sub_remind', $emaildata['is_html'], 2);

if ($subs_notify & 0x01)

Let me know how it goes.
A question worth asking is born in experience & driven by necessity. - Fripp

Sir Osis of Liver

Made the change, will check error log tomorrow.
When in Emor, do as the Snamors.
                              - D. Lister

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Sir Osis of Liver

Last error was logged April 24, 2025, 07:20:46 PM, so that worked.  Will notification emails still be sent?

When in Emor, do as the Snamors.
                              - D. Lister

shawnb61

No, because those particular users have no notification preferences set.

I.e., they haven't opted in to receiving any email at all.
A question worth asking is born in experience & driven by necessity. - Fripp

Sir Osis of Liver

Aren't default prefs set for all members in 2.0.19?
When in Emor, do as the Snamors.
                              - D. Lister

shawnb61

Yes, same in 2.1. 

But ever since GDPR, in 2.0 & in 2.1, email requires an opt-in.
A question worth asking is born in experience & driven by necessity. - Fripp

Sir Osis of Liver

Ok, we'll see what happens.  It's not running in production, the migration to new server went fine but they're getting 403s on some (not all) phone browsers, and host hasn't been able to fix it.
When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: