News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Disable sending select email notifications?

Started by MobileCS, September 27, 2023, 11:32:01 PM

Previous topic - Next topic

MobileCS

Is it possible to disable sending select email notifications?

The ones I would like to disable are : sticky topic, topic locked, topic moved and topic removed.

Diego Andrés

In your your profile in notifications you can select to receive only replies.

SMF Tricks - Free & Premium Responsive Themes for SMF.

MobileCS

No, what I mean is sending them to other users.

I do not want them to be notified on certain admin actions - even if they are watching the topic.

Aleksi "Lex" Kilpinen

Why? They're going to notice anyway. It's not like the notification is the only way to see what happened.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

MobileCS

That's true, but what I meant was they don't need to be notified by email that it's happening.

My forum has over 50,000 members, so it would cut back on sending (what I consider) non-essential emails.

Kindred

The only way to stop those would be to modify the core code
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MobileCS

If I were to modify the code, I'm assuming subs-post.php is where I would make the changes?

I was thinking in this section :

foreach ($notifications as $lang => $notification_list)
Then check $subject if it contains "Topic merged:" or whatever, and use a continue statement if found, bypassing the sendmail() function.

Or is there a better way?

Sesquipedalian

Rather than changing the code, which could have unexpected side effects, I suggest that you just run this SQL query:

UPDATE smf_user_alerts_prefs
SET alert_value = 2
WHERE alert_pref = 'msg_notify_type' AND alert_value < 2

Replace smf_ with whatever table prefix your own database uses.

This will change everyone's notification preferences so that they only receive notifications (1) about replies to topics they are following, and (2) about moderation actions for topics that they themselves started, but not for any other topics. This means that if, for example, you lock a topic or whatever, a single notification email will be sent out to one user (specifically, the original poster) and no one else.

It will still be possible for individual users to manually turn on notification about moderation actions on topics they didn't start, but virtually no one will ever bother to do that.

This approach should accomplish your goal of reducing mail volume while avoiding any risk of adverse side effects.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

MobileCS


Advertisement: