Email notifications in new SMF-2.1.6

Started by Liviu Lalescu, June 28, 2025, 02:40:15 AM

Previous topic - Next topic

Liviu Lalescu

Hello!

I have two email notification on my forum which stay in the queue for 8 and 3 hours. I tried sending queued messages, but nothing. I sent a test email and it works.

Liviu Lalescu

#1
I tried some more times sending queued emails. The one 8 (now 9) hours old was sent, but the 3 hours old one refuses to be sent.

Edit: after more tries to send queued email, the 3 (now 4) hours old email was also sent.

Liviu Lalescu

I would like to add the with SMF 2.1.4 the notifications (new topic, reply to a topic, or private message) were sent very fast (only when a person quoted me in a post it might have been delayed for 10-20 minutes).

But with SMF 2.1.6 the notifications are very much delayed - many hours. This is similar to this forum (SMF), where I receive email notification very late, many hours late. I consider this incorrect.

Darkness7148

Same thing on my forum and even on here. Emails are taking ages to come through.

Volker S

I've noticed that too. For me, notifications for new threads in a topic I'm following take up to 22 hours.
Version 2.1.4 felt much faster.

Strangely enough, a cron job that I run every 30 minutes (/usr/bin/wget -q -t1 http://www.jollauser.de) doesn't work either. This tip was suggested here in the forum some time ago. I don't know if it used to work.

However, my observation refers to 2.1.5 (not 2.1.6 – is that already available? 2.1.5 has only just been released).

Liviu Lalescu

Volker S, 2.1.6 was a quick fix release, released just 2 days after 2.1.5. My forum's 2.1.4 notifications were fast, but now it take ages to send them. Even if I try to send queued mails it does not always work. Yes, also on this forum I am getting the email notifications many hours after they were posted.

Volker S

In the last few minutes, the email notifications have been arriving incredibly quickly. Maybe it was just the provider (I haven't changed anything myself)?

VadiKO

+1

I also had problems sending notifications after updating to 2.1.5 and 2.1.6. They just hang in the queue and that's it. No errors, changing the server doesn't solve the problem, the test message is sent without any problems.
 :-\
IPTV [nofollow]

MobileCS

#8
I think the issue is that SMF is putting in the wrong date/time in the "time sent" column in the mail queue table.

My 4 entries have 1750794780, which converts to Thursday, July 24, 2025 at 12:53 PM (PST)

in ScheduledTasks.php:

// First, figure out when the next send attempt should happen based on the current priority.
$next_send_time = $email['time_sent'];
for ($i = 0; $i < $email['priority']; $i++) {
$next_send_time += 20 * max(0, $email['priority'] - $priority_offset);
}

This means the next send time won't happen until Thursday, July 24, 2025 at 1:59:40 PM PDT


shawnb61

As an FYI, the team has been working on this & has a proposed solution up on GH:
https://github.com/SimpleMachines/SMF/pull/8716

More discussion on what is happening & why is in the other thread:
https://www.simplemachines.org/community/index.php?msg=4191540
A question worth asking is born in experience & driven by necessity. - Fripp

Liviu Lalescu

Hmm... for the last two replies on this topic I did not even get an alert here!!!

Liviu Lalescu

Hello!

So, will we be getting an updated official SMF version for delayed queued emails? I am reluctant to modify manually the SMF code.

CRM 114

Quote from: Liviu Lalescu on July 07, 2025, 04:38:36 AMI am reluctant to modify manually the SMF code.
Why?

(My) Safe Workaround:
1. Make a copy of the original ScheduledTasks.php.
2. Use the complete code from Github to create a modifed ScheduledTasks.php: https://www.simplemachines.org/community/index.php?msg=4191638 and upload it via FTP.
3. When the official patch is available, copy back the original file, and after that patch SMF.

Saved me a lot of trouble. :)
German Wet Shaving Forum: www.gut-rasiert.de/forum

Liviu Lalescu

OK, you convinced me. Thank you! I did it and I hope it will work. :)

CRM 114

German Wet Shaving Forum: www.gut-rasiert.de/forum

Liviu Lalescu

Oh, sorry, CRM 114, I forgot to reply! Yes, it works perfectly. I need to be careful at the next SMF update and revert the change before updating.

CRM 114

German Wet Shaving Forum: www.gut-rasiert.de/forum

Liviu Lalescu

Thank you, and thank you for the good advice! :)

MegaBrutal

Quote from: shawnb61 on July 01, 2025, 11:34:35 PMAs an FYI, the team has been working on this & has a proposed solution up on GH:
https://github.com/SimpleMachines/SMF/pull/8716

More discussion on what is happening & why is in the other thread:
https://www.simplemachines.org/community/index.php?msg=4191540

The issue affects me too, some of my notifications stay in the mail queue for several days.
If you're at it, could you fix Issue #8180 as well? There is already a proposal for it by @SleePy.
Despite this.
I feel obligated to suggest.
Should you choose to create this world once more.
Another path would be better suited.


Advertisement: