Forums | Mahara Community

Open Discussion /
Email notifications in Mahara


Sigi's profile picture
Posts: 102

17 March 2010, 14:00

Hi John. Hwere's the fix for the email notification bug. it worked fine with my site.

http://gitorious.org/mahara/mahara/commit/7bca9f460dcc66d51b56b8d22728f5cec170539e

anonymous profile picture
Account deleted
Posts: 3

15 July 2010, 8:00

Hi there,

I have this same issue in a 1.2.3 install: notifications are not sent for subscribed forums but work fine for friend requests, for example.

I applied the suggested fix but the problem persists. Any suggestions?

Thanks,
David

anonymous profile picture
Account deleted
Posts: 808

15 July 2010, 16:22

David,

Is your cron set up correctly?  Forum post notifications are delayed, while friend requests are sent immediately.  One way to test this is to see if you get 'contact us' emails - these are delayed too, so if you don't recieve them, it's most likely a problem with cron.  There are instructions on how to set it up in the installation area of the wiki.

If you do get contact us emails but not the forum post emails, then you might be suffering from the bug described in this thread.  You should upgrade to 1.2.5 to fix that.

anonymous profile picture
Account deleted
Posts: 3

19 July 2010, 5:13

Hi Richard,

thanks for your reply, the cron job was indeed missing. I assumed the other admin had taken care of all the installation details, and he thought the same :P

anonymous profile picture
Account deleted
Posts: 34

09 August 2010, 8:20

Erm the system appears to have not registered my post even when I hit Post, so here we go again...

I am unable to persuade the cron (which wasn't set up it seems) to send out the forum notification emails (friend request, group membership etc are working fine). When running the cron job the first time, I came up with this error hundreds of times:

Could not instantiate mail function.

As well as a couple of instances of:

Invalid address: noneYou must provide at least one recipient email address.

So I took the $cfg->smtphosts variable and added it (with IP address of an smtp server) to the config.php file and reran the cron script. No output from script at command prompt, and no emails coming out either (having been on a forum / group and deliberately generated a few which should come to my inbox). What am I missing?

Thanks in advance,
Dave

Iñaki Arenaza's profile picture
Posts: 253

09 August 2010, 9:57

I think Mahara has marked those notifications as sent, even if your site wasn't able to deliver them.

So if you want to resend them again, you'll need to make changes to your mahara database. I thinks it's the 'sent' column in the interaction_forum_post table. You need to set it to 0 (zero) if you want to resend a given post.

Saludos.
Iñaki.

anonymous profile picture
Account deleted
Posts: 34

10 August 2010, 10:00

Thanks for that Inaki, but all the rows in that table are 0 and the cron job hasn't prodcued any emails :(

I've had a look at a few other tables, and one called notifiaction_config has no rows in it. Should there be one in there which tells the forum plugin to actually send them?


Dave

anonymous profile picture
Account deleted
Posts: 808

10 August 2010, 17:15

The cron job doesn't try everything every time it's run, these things are controlled by the nextrun column (and minute, hour, etc) in the 'cron' table and other plugin tables ('interaction_cron' does forum posts).

The interaction_forum_new_post function from interaction_cron just marks forum posts as sent and then queues notifications up in the activity_queue table.  Later on, the activity_process_queue function (from the cron table) will be run to clear out the queue and send out emails.

So if the sent column still says 0 then the function to queue up the forum post notifications isn't being run, which means the problem is probably nothing to do with your mail setup.

anonymous profile picture
Account deleted
Posts: 34

31 August 2010, 5:07

Hi Richard, thanks for that.

I'm not sure what's best for me to do next, is there some set of tests I can run for further guidance on what might need fixing (I'd have thought using the latest stable code base should mean it work ok). And you're right, email setup looks ok as it's dishing out the friend/group membership requests etc that are done instantly.

Thanks

anonymous profile picture
Account deleted
Posts: 808

31 August 2010, 19:16

Dave,

Is your cron actually running by itself yet, or do you still have to run it manually?

If the nextrun column of the cron table is full of old dates, or if you have notifications building up in the activity_queue table, then it's not set up properly.

If cron is running by itself, and the email setup is good for the instantaneous notifications, then it's an email problem that only occurs for cron.  One possibility (if you're running command-line php on cron) is that the command-line version of php is not set up to send email.