MyBB Community Forums

Full Version: Email Notification for all PMs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,
In the default configutation, a user gets only one notification mail until they log in again, regardless of how many PMs they get after the first notification mail.

Is there a way where one can change the setting to the effect that users are alerted of *every* new PM or at least once every 24 hours?

Open ./inc/datahandlers/pm.php and find;
$query = $db->simple_select("privatemessages", "dateline", "uid='".$recipient['uid']."' AND folder='1'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 1));

and if you want to send emails each time PM received consecutively upto 5 times then Change 1 t 5 like this;
$query = $db->simple_select("privatemessages", "dateline", "uid='".$recipient['uid']."' AND folder='1'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 5));
»MyBB Bot«™ indeed. Thanks for the quick reply.
Thanks. Wink
Hm. Just tested it; it doesn't send a second email.
Wait for sometime.
120 Minutes later and the mailserver log still says the forum didn't send a notification.

What exactly is that "limit" there?
Actually that query is not the right code to edit if you want to get email for every PM notification. Revert that query to the original one.

The code you need to edit is in the same file:
/inc/datahandlers/pm.php
Around Line# 564

if($recipient['pmnotify'] == 1 && $recipient['lastactive'] > $lastpm['dateline'])
			{

Change it to:
if($recipient['pmnotify'] == 1)
			{
I'll try that. Thanks Smile