Email Forum Posts

Email Forum Posts

by Tom B -
Number of replies: 35
Hello,

I created a class which has a forum. Everyone is subscribed but forum posts are not being emailed. How do I fix this?

Tom

Average of ratings: -
In reply to Tom B

Re: Email Forum Posts

by Gregory VanStrien -
The only way I have made this work is to assign everyone a role. This seems to have changed since 1.7
In reply to Tom B

Re: Email Forum Posts

by Gregory VanStrien -
The only way I have made this work is to assign everyone a role. This seems to have changed since 1.7
In reply to Gregory VanStrien

Re: Email Forum Posts

by Alexandre Duarte -

Gregory,

   What you say is correct but...

   I have a lot of courses in my website, it's tuff to define roles one-by-one forum in all courses.

   Roles principle say that if a role is defined at i higher context (course level) then all courses and all activities within (lower context) will be afected by that role.

   At course level i have set a role but when i go to the forum role level no roles are defined.

   I can't understand why does not a role appear already set at the forum once i have set the role at a higher context.

   Thanks.

In reply to Tom B

Re: Email Forum Posts

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Tom,

The first thing to check is to see if "cron" is running. Cron is a timed script that sends out forum emails among other things. Sometimes when people set up a new site, they forget or miss this important setup step.

Are you the admin of the site? If not, ask your admin to check this and other possible reasons. If you are the admin, you can quickly check this by going to the main admin page. You might see a warning at the top that cron has not been run for 24 hours or something like that. Click on it, and see if that makes the emails go out. If that works, you have located the problem. Then read Moodle Docs for how to set up Cron.

Cheers! smile
In reply to Don Hinkelman

Re: Email Forum Posts

by Nad Nouicer -

Hi Don,

Thanks it is working and I run moodle 1.6.

A question: Is there anyway to run cron automatically or do I have to do it every 24 hours?

Thank you for your help.

Nad

In reply to Tom B

Re: Email Forum Posts

by Solomon Gifford -
I had this problem as well until I assigned everyone a role (edit the forum, select assign roles). I would suggest (to the developers) that when upgrading moodle every user should be given a default role.
In reply to Solomon Gifford

Re: Email Forum Posts

by Barbara Trainor -
I'm having the same problem with emails being generated for forum postings. I had the cron problem and when fixed I received MANY emails for forum postings and assignment uploads yesterday. Today, I am receiving some assignment notices but NO emails for forum postings; there is no notification that there is a cron problem and assigning roles hasn't corrected the problem.

HELP

Barbara


In reply to Barbara Trainor

Re: Email Forum Posts

by Meilech Leib DuBrow -
Same Problem here, except that the only who is getting emails for forum postings is me. Cron is definitely running. It even says that forum ran, but only sent out email to 1 subscriber. Everyone also has a role.

So what's next?
In reply to Meilech Leib DuBrow

Re: Email Forum Posts

by Simon Clegg -
I'm also having problems with emails in 1.7.1+ cron seems to be set up properly but emails are not going out in forums. I've replied to 4 or more discussions with the same problem but there seems to be no answers - please help! thoughtful
In reply to Simon Clegg

Re: Email Forum Posts

by s tickner -
We are also having these problems and can't find a reason. Thanks for any help!
In reply to Solomon Gifford

Re: Email Forum Posts

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
To make it clear, there should be NO NEED for anyone to assign any roles at the forum level. surprise

They do have to have a role at the course level of course (teacher, student, whatever) just like always. smile

Thing are working OK for me on all my sites, even 1.8 ones.

If you are having problems you should provide as much information as you can to help people debug the problem. What are all your settings for the forum? What version of Moodle are you running exactly? (Try getting the very latest version from your current stable branch of 1.6, 1.7 etc ) Is cron set up and working? is email set up and working? etc

Cheers
In reply to Martin Dougiamas

Re: Email Forum Posts

by Ye Chen -

Martin,

We are using Moodle 1.72+ and Moodle 1.8+, both have problem with sending email from Forum. The cron is working. we are using PHP default method to send email. When people create new account, they can get confirmation email from moodle. But Forum, they can not get anything.

Our moodle is running on Mac OSX 10.4. One issue here is on apple server, there is another mail server application called postfix, although we turned it off, our cron is running every minutes, and postfix generate a lot of error message about fail to send emails. I don't know whether it is related to moodle although in moodle mail settings, we chose using PHP default method which is Send Mail method. So it should not trigger postfix to send email.

Do you have any idea where I should go to fix the problem?

Thanks

Ye

In reply to Ye Chen

Re: Email Forum Posts

by carlos sandoval -
Martin:

We are using 1.7.2+ and have problems with forum cron . When there are some new forum posts appears something like:

Server Time: Fri, 13 Apr 2007 09:10:02 -0400
Starting activity modules
Processing module function assignment_cron ...done.
Processing module function chat_cron ...done.
Processing module function forum_cron ...Processing user 528


After that, Cron gets stuck and doesn’t send any email for users.


Carlos


In reply to carlos sandoval

Re: Email Forum Posts

by Fahmy Babjee -

Can anyone help to identify why cron gets stuck at "processing user 528"?  I'm experiencing a similar problem on 1.9.5.  I've been running cron manually for the past week to see if the site news emails get sent out, but cron always gets stuck here.

Forums and site news emails were all working fine previously.  It's frustrating when the emails stop for no apparent reason.  I've even turned email debugging on and no other error messages appear.  Without any error messages, it's difficult to identify the root of the problem! It's always stuck at "processing user".

Any advice or assistance greatly appreciated!

In reply to Fahmy Babjee

Re: Email Forum Posts

by Heather P -
check your database - have you got a user with an id of 528 or did the entry get corrupted?
In reply to Heather P

Re: Email Forum Posts

by Fahmy Babjee -
Thanks Heather, but we managed to figure out the problem. 1.9.5 had a bug in which forum cron processing gets stuck if the php version isn't php 5 (we were using 4.3.9).  We've since upgraded to the latest version of 1.9.5 and forum mails get sent out properly now.
In reply to Martin Dougiamas

Re: Email Forum Posts

by Paul Kalkstein -
Is everyone subscribed to the forum? The admin can do it for all, or individuals can choose when they make their first post.
In reply to Paul Kalkstein

Re: Email Forum Posts

by Matt Gibson -

I am having a similar issue.

Cron says:

Processing module function forum_cron ...Processing user 252
Processing user 2
Sending post 823: test post
1 users were sent post 823, 'test post'
done.

(this is with 2 subscribers, both with email defined as enabled), but nothing comes through.

I have not tried asssigning roles yet.

Using windows installer package on Win2k3 with Mysql and microsoft exchange (my own account, but sending as noreply@domain.com)

Matt

In reply to Martin Dougiamas

Re: Email Forum Posts

by Myo Han Htun -
Dear Martin,

We have upgraded Moodle to 1.8+ today (June 18). We have 2 servers, Windows 2003 and Linux Fedora. On Linux, everything works fine and mails are sent from site level forum (Front Page) but on Windows 2003 mails are sent from course level but not site level. So I guess the problem is related to Windows based Moodle. Any help is highly appreciated.

Best regards,
MYO HAN HTUN
In reply to Myo Han Htun

Re: Email Forum Posts

by Matt Gibson -

I've been looking into this further, we run exchange 2003 and I'm sending using a dedicated account moodlenoreply@ourmoodleinstall.com. If I send using the 'mail out immediately' check box at the bottom, it doesn't work, but the daily digest of forum posts later on does send. nothing gets out of the schol at all, even though the mail system accepts the message and says its queued for delivery. Can you replicate this?

Is there a difference in the way moodle handles these 2 events? I'm stumped on this one.

Matt

In reply to Matt Gibson

Re: Email Forum Posts

by Steven Singer -

Hi Matt,

This is an interesting one. I am struggling with this myself.

Except strangely when I mark the forum post to 'mail now' the cron job works and posts the forum out. If I leave it as a '30 min posting' the cron job doesn't send the mail. It does however mark the 'mailed' column as 1 in the mdl_forum_posts table.

All other emails post correctly such as password reminders and the messenger etc.

I am using a Groupwise mail server and Windows 2003/IIS6 PHP 4.3 and MySQL 4.1.16. It seems to affect all my moodle instances from 1.6.x to 1.8.

I have asked IT to check whether the mail server is crushing the posts as spam - perhaps the noreply address is doing something?? thoughtful If you come up with anything please let me know.

Cheers

Steve

In reply to Steven Singer

Re: Email Forum Posts

by Mariana vd Walt -
Hello

I am running on IIS6, PHP 5.1.4, MySql 4.1.18. I have this exact problem on site level. The only person receiving mail from a post is the admin user (who did the post and asked for a copy). Nobody else does.

Is there a solution to this problem yet?

Thanks
Mariana
In reply to Steven Singer

Re: Email Forum Posts

by Matt Gibson -
Hi Steven,

I've pretty much established that its not a spam issue as the messages don't show up in the spam folder. I expect your reversal of my problem may be due to using a different mail server. I have logs of the server's activity, but no idea how to read them. They all seems to say it works fine. Oddly, there are no delivery errors generated for any of the messages. My best guess is that there is some relay setting on the mailserver that is stopping things, but surely an error report such as 'relay acces denied' would come back?

I will keep you informed.

Matt
In reply to Matt Gibson

Re: Email Forum Posts

by Matt Gibson -
OK,

I think its possibly a port 25 problem. My local mail that gets delivered is going to outlook accounts, which communicate via MAPI and don't use SMTP directly. I'm investigating whether my organisation has a virus scanner blocking port 25.

Further investigation shows that the messaging system sends to offline users who have an internal mail address, but not to external ones.

forum cron is failing to send with the 'mail now' checkbox as per these logs

Starting activity modules
Processing module function assignment_cron ...done.
Processing module function forum_cron ...Processing user 252
0 users were sent post 833, 'test again'
done.
Processing module function journal_cron ...done.
Processing module function workshop_cron ...done.
Processing module function ipodcast_cron ...
 Checking for stale entries

button from working?

In reply to Matt Gibson

Re: Email Forum Posts

by Steven Singer -

Hi Matt,

Thanks for your response.

I am still waiting for IT networks to read the logs and let me know what is happening - so no hurry there then. I am now even looking at using an external SMTP Auth relay service to send the mails out on another port and not 25.

I am hoping that by letting this go through as a test (providing I am allowed) I can prove that the internal mail system is the problem and not Moodle which at the moment I can't convince them completely.

As soon as I get some useful info from the logs i'll let you know.

Cheers

Steve

In reply to Steven Singer

Re: Email Forum Posts

by Bruno Rosa Brunão -
Hi Matt and Steven!

I'm having the same problem. I have access to internal mail logs from the server and there is no "connection" log or even a "failure" that would give a hint about what is going on. I'll keep trying.

I'll post anything I get.

Cheers
Bruno
In reply to Bruno Rosa Brunão

Re: Email Forum Posts

by Steven Singer -

Hi Bruno,

Yes. Our IT department have just confirmed exactly the same issue. It is as though the mailout hasn't even hit the mail server at all. There are certainly no logs or failures showing up.

They have managed to narrow it down to the firewall, mailserver or mail content filtering software! surprise 

My bet is a new rule being applied on the firewall spotting multiple mails and stopping them.

I'm hope we will crack this sooner rather than later. At least our schools are on holiday now.

I'll let you know.

Cheers

Steve

In reply to Steven Singer

Re: Email Forum Posts

by Matt Gibson -
That's a result at least. Have you tried turning on 'debug email' on the admin debugging screen? It should give you live output from the email connection when you send messages or run cron. Sadly, mine shows what apears to be a completely healthy email connection which vanishes somewhere between the server and my inbox sad
In reply to Matt Gibson

Re: Email Forum Posts

by Matt Gibson -

Further checks on the debugging messages from the mail server seem to show that the sender is the admin email address, not the noreply address that I have entered into the email settings. This may be triggering a spam alert somewhere if it looks like a spoofed email. Can anyone comment on why this is happening?

Debug from bulk messaging:

SMTP -> get_lines(): $data is "235 2.7.0 Authentication successful.
"
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 2.1.0 adminuser@email.address....Sender OK
"
SMTP -> get_lines(): $data is "250 2.1.0 adminuser@email.address....Sender OK
"
SMTP -> FROM SERVER:
250 2.1.0 adminuser@email.address....Sender OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 2.1.5 student@our6thform.net
"
SMTP -> get_lines(): $data is "250 2.1.5 student@our6thform.net
"

In reply to Matt Gibson

Re: Email Forum Posts

by Matt Gibson -
OK, I have now got it to work! smile

However, not as well as I'd like. By changing my own email address (I'm the admin) to my school account, it worked all of a sudden. After dissecting our mail scanning software with a fine toothed comb and finding nothing, I think its to do with exchange or perhaps our ISP being configured to only allow local senders. I'm now trying to find out which.
In reply to Matt Gibson

Re: Email Forum Posts

by Mike Jackson -
This seemed to fix my problem. As far as I can see, the admin e-mail address must be valid on the smtp server for the e-mails to go out. We changed our username system over the summer and that broke the moodle forum e-mails, because my admin user had an address which was valid in the old system but not the new one...
In reply to Mike Jackson

Re: Email Forum Posts

by IT Staff -

We get admin emails from moodle (backup and login error info) ok but the forum and "send message" emails don't even hit our SMTP server.  I can fully track the admin emails via Exchange Message Tracking.

The attached .php sends mail without a problem and the smtp host and from address are exaclty the same as my values in the Mail config of Moodle (verison 1.5).

So what do I look for to find out why forums won't send email?

In reply to Tom B

Re: Email Forum Posts

by Sergei Yegorov -
I solved my problem by configuring cron in my web host panel to run cron every 30 minutes.
http://docs.moodle.org/en/Cron#On_web_hosting_services
The post are not still sent immediately, but it's better then nothing. I found out that some students' mail hosts treat this messages as spam.
In reply to Sergei Yegorov

Re: Email Forum Posts

by Sylvain Houmeau -

Hi,

Using Moodle 1.8. I have the same problem where no emails are being sent out from forum posts.

I read this thread, and also the link you posted. I tried to check on the cron, but I am a newbie at this.

The command line says this: cd '/home/seminair/public_html/admin/' ; php -q 'cron.php' > /dev/null ;

Is this correct? I knwo the first part refers to my directory wher the cron.php is, but the rest leeaves me puzzled. Can you help me out???

This is quite urgent!

thank you smile

In reply to Sylvain Houmeau

Re: Email Forum Posts

by Matt Gibson -

the command line means:

  • change directory (cd) to the one where the csript is
  • use php to run the cron.php script
  • don't show any information whilst doing it (-q for quiet)
  • put the output in the bin (> /dev/null)

what system are you running on? Its different for Linux and windows.