Forum

 
 
Picture of Sandy deFerbrache
Forum not sending eMail - Cron is working
 
Greetings
Running the latest version of Moodle. When I first loaded the forums would send eMail - no settings have been adjusted and the cron is / was working. About 3 days ago the forums just stopped sending. Can someone give me some ideas here?
Thanks,
Sandy
 
Average of ratings: -
Picture of Sandy deFerbrache
Re: Forum not sending eMail - Cron is working
 
I just tried registering as a new user to see if any mail was going out - the registration eMail WAS sent - so the program IS working. Just not the forums.
 
Average of ratings: -
Picture of William Claps
Re: Forum not sending eMail - Cron is working
 
I have the same problem Sandy.  Please let me know if you find a solution.  It happens no matter what version of moodle I use.  So I think it something in the permissions or roles that I have set up.  I think I'm going to experiment with a fresh install with a new database.  I'll let you know if it works.
 
Average of ratings: -
Picture of Joe Griffin
Re: Forum not sending eMail - Cron is working
 
I have a similar problem, cron is running and I get this message:
Could not instantiate mail function.

I posted a question about it on the General Problems forum because I also don't get email confirmation for new users.


 
Average of ratings: -
Picture of IT Staff
Re: Forum not sending eMail - Cron is working
 

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?

 
Average of ratings: -
Picture of John Isner
Re: Forum not sending eMail - Cron is working
 
Turn on debugging for email messages and see if it tells you anything. You must check two boxes:

Site administration -> Server -> Debugging -> check "Display debug messages"
Site administration -> Server -> Debugging -> check "Debug email sending"
 
Average of ratings: -
Picture of Samuli Karevaara
Re: Forum not sending eMail - Cron is working
Group DevelopersGroup Particularly helpful MoodlersGroup Translators
We have a more obscure version of this behavior: some forum mails are not being sent when the live cron is running. Sometimes some of the subscribers get the post, some don't. The mail cron doesn't seem to time out: I'm logging the cron action and there are no significant gaps in the time-line, no odd messages. Things seem fine.

But if I mark the mailed posts as "mailed = 0" and run the cron manually again, the posts always seem to mail out fine. Same on the test machine (though it's just simulating the mails).

Anybody else with similar symptoms?

I have to enable more logging, but logging everything e.g. all the queries from the "live action" produces a ton of stuff per second smile
 
Average of ratings: -
Picture of Jeff McKune
Re: Forum not sending eMail - Cron is working
 
For a couple of months, we have been chasing a problem that appears as though forum posting email notification messages are not being sent. Some people receive them and some people don't. We were able to find some folks to help us with the diagnostics, and they found that the problem was related to the fact that Moodle sends "bare line feeds" (not preceded by a carriage return) in the notification email, which is against the SMTP email handling standards. Here is a link that describes the problem:

http://pobox.com/~djb/docs/smtplf.html

Here is a brief log entry (failed message) supplied by the diagnostic team, along with their comments when we told them notification worked with a Yahoo address:

2007-10-24 17:58:00.491020500 tcpserver: pid 11441 from 209.106.228.23
2007-10-24 17:58:00.491339500 tcpserver: ok 11441 server272.com:64.14.68.49:25 :209.106.228.23::35361
2007-10-24 17:58:00.719394500 11441 < MAIL FROM:<MoxleyD@health.missouri.edu>
2007-10-24 17:58:00.771704500 11441 < RCPT TO:<jeff@mckune.net>
2007-10-24 17:58:00.881997500 11441 > 451 See http://pobox.com/~djb/docs/smtplf.html.
2007-10-24 17:58:00.882001500 tcpserver: end 11441 status 256
=================================================

We are running QMail as a mail agent. Bare LFs are considered an error by this agent as they are violating the SMTP mail sending standards. Most likely Yahoo is using a different mail agent that is not considering this as an error. Please note that we can't change the behavior of QMail on our side. You will have to correct the format of the message that you are trying to send. You can also contact the developers of the software that you are using and notify them about the issue.

We are not sure how to fix our Moodle configuration to change this. It could be that it is something that needs be changed in the Moodle code. Would someone be able to help us with some direction on this?
 
Average of ratings: -
Picture of Bruce Schmoetzer
Re: Forum not sending eMail - Cron is working
 
Please post this information (after searching to be sure there are no duplicates) to the Moodle Issue Tracker. If you don't already have one, you will need to get a new account on the Tracker. Since this is a core issue, it is definitely worth reporting.
 
Average of ratings: -
Picture of Ellis Anders
Re: Forum not sending eMail - Cron is working
 
What intrigues me is the fact that at some point in time, the forum post e-mail notifications do in fact trigger in the "beginning". I have two test installations, a 1.6.2 server and a 1.7.1 server. On my 1.6.2 installation, I did trigger a mass e-mail due to a Site News post. Shortly thereafter, the functionality ceased to cooperate anymore.

On my 1.7.1 server, the manually run cron confirms the post being sent, but then ir evaporates before it can hit the SMTP host. If this "bare line feeds" is the issue, why the inconsistency in success? Wouldn't it fail every time? I sure i'm missing something...
 
Average of ratings: -
ellen thinking at her desk
Re: Forum not sending eMail - Cron is working
 
I think this would make sense if it didn't originally work, but like the original message posted in this forum, our forums and messages WERE once working. They suddenly stopped for no apparent reason. I don't even know where to begin looking. Our problem sounds exactly like the one at the very top of this forum

I turned on the debugging settings recommended above, but am not sure what to be looking for. I posted a message in a forum and manually ran the cron. The only message I saw, which was a new kind of message, was the following:
<div class="notifytiny" style="text-align:center">Error: Invalid context creation request for level "50", instance "8".<ul style="text-align: left"><li>line 1685 of lib/accesslib.php: call to debugging()</li><li>line 1844 of lib/accesslib.php: call to create_context()</li><li>line 174 of admin/cron.php: call to get_context_instance()


Not sure if that is related to email or not.
 
Average of ratings: -
Picture of Dorothy Small
Re: Forum not sending eMail - Cron is working
 

This is frustrating, and agree, our email notifications for Forums worked well until the upgrade. I will be glad when this is solved.

 
Average of ratings: -
Picture of Tonya Riney
Re: Forum not sending eMail - Cron is working
 

We've had to manually run the Cron multiple times with the upgrade.  Unfortunately have no solutions to offer. sad

Tonya

 
Average of ratings: -
Picture of Arturo Israel García Castro
Re: Forum not sending eMail - Cron is working
 
We can send emails from forums messages they are delivered fine, but we have problems when sending confirmation emails they just dont arrive, We are using a MS Exchange server. What we have noticed in debuging mode is:

with forums
<moodlepost28@201.116.28.98> Queued mail for delivery

with confirmations
"250 2.6.0 <58d9f03696646c05eba68933fa4b27f7@201.116.28.98> Queued mail for delivery "

Them seem to be well delivered, but forums are the only one message that arrive.

What are the differences between sending forum messages and confirmation emails?



 
Average of ratings: -
Picture of santu roy
Re: Forum not sending eMail - Cron is working
 

We are providing bulk email solution
Cheap Dedicated server with multiple IP Address
PowerMTA email Server and Interspire Email marketer
Contact Us
Skype ID : san2roy
Gtalk ID : san2roy
Email : san2roy @ gmail .com

 
Average of ratings: -
Picture of Greg de Vitry
Re: Forum not sending eMail - Cron is working
 
Try repairing your forum table(s). Our emails stopped, I ended up here... eventually tracked down the cron job (tested with the next .x version... emails worked).
SELECT p.id, p.discussion FROM {$CFG->prefix}forum_posts p,
{$CFG->prefix}forum_discussions d
WHERE p.mailed = 0
AND p.discussion = d.id
AND d.timestart > '$now'
Returned: p is corrupt.

Looks like two days ago, the table became corrupted. Not sure why.

We are using mysql 5 (lamp). So repairing was easy. smile Re-ran the cron.php and 210 email went (40 of them were my test ones!).

Greg


 
Average of ratings:Useful (1)
MrWhiskers
Re: Forum not sending eMail - Cron is working
 

I know this thread is working on two years old, but the topic/subject is the same now.

I was running v1.9.2 as a new instance where posts within the forums were emailing to subscribed users fine. Then stopped. A few have reported getting an email of posts from various forums, but for the most part, most are not.

Last weekend, I was reading where v1.9.3 may be having issues with emails not being sent so upgraded to: Moodle 1.9.4+ (Build: 20090204)

No luck. However, I have found that if I manually run Cron before the time to edit message runs out, the posts will send emails out to all subscribers.

I have another instance of Moodle v1.9.3 running and having no problems whatsoever.

Both installations are on a hosted service, same provider and near as I can tell, with the same server settings/configuration.

Anyone have any suggestions?

Thanks,
Steve

 
Average of ratings: -
MrWhiskers
Re: Forum not sending eMail - Cron is working
 

Never mind.

After CAREFULLY looking at the command line for running the CronTab in Linux, I discovered the error to be a case of the wrong case. The "-o" should have been a "-O". When I changed it, the posts all email out fine now.

Thanks anyway.

 
Average of ratings: -
Picture of Mike Korn
Re: Forum not sending eMail - Cron is working
 
Hi Steve,
Can you elaborate on your solution? We are running Moodle on an Ubuntu server and have the same problem.

thanks,

Mike
 
Average of ratings: -
Carol walking in the Howgills
Re: Forum not sending eMail - Cron is working
 
Not sure if my problem is related. Emails go to subscribers with gmail email accounts but not to subscribers with email on our own Zimbra server. Our mail server doesn't seem to even see the messages.

I'm sure cron is running (since some emails are going) Can anyone advise on this one, or how to track down the problem e.g. where can I find logs of failed attempts to send emails?

thanks
Carol
 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Forum not sending eMail - Cron is working
Group Particularly helpful MoodlersGroup Testers
Hi Carol,
If the situation is as you stated -- all emails with gmail accounts arrive and no emails on your own server arrive (are there any other email addresses & do they get mail? ) -- I would suspect that your Zimbra server thinks it is being spammed by Moodle, especially if the number of messages is fairly large.

 
Average of ratings: -
Carol walking in the Howgills
Re: Forum not sending eMail - Cron is working
 
That sounds likely. We're new to running Zimbra as well so I'll have to figure out how to un-train it
Thanks
Carol
 
Average of ratings: -
Carol walking in the Howgills
Re: Forum not sending eMail - Cron is working
 

Thanks Ben,

I found /var/log/mail.log and when I looked, I could see lines like:

Mar 16 17:00:01 ubuntu-server postfix/smtp[14168]: B0CE5BBC703: to=<a.user@wolsinghamschool.net>, relay=none, delay=0.17, delays=0.16/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=wolsinghamschool.net type=A: Host found but no data record of requested type)

I'm guessing this means that our internal A record for the Zimbra server is not correct.  Would this explain why mail reaches mail servers outside our network but does not reach the mail server on our network?

Carol

 
Average of ratings: -
Carol walking in the Howgills
Re: Forum not sending eMail - Cron is working
 

Thanks Ben,

I found /var/log/mail.log and when I looked, I could see lines like:

Mar 16 17:00:01 ubuntu-server postfix/smtp[14168]: B0CE5BBC703: to=<a.user@wolsinghamschool.net>, relay=none, delay=0.17, delays=0.16/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=wolsinghamschool.net type=A: Host found but no data record of requested type)

I'm guessing this means that our internal A record for the Zimbra server is not correct.  Would this explain why mail reaches mail servers outside our network but does not reach the mail server on our network?

Carol

 
Average of ratings: -
Picture of Irma Gamez
Re: Forum not sending eMail - Cron is working
 

Hi!

It´s a long time ago but I´m having this problem with Moodle 1.9: "Zimbra server thinks it is being spammed by Moodle". The administrator network disabled all emails and now nobody can reset their password. ¿Can we just send emails for this issue and ignore the rest?

Thank you.

 
Average of ratings: -
Picture of Victor Castro
Re: Forum not sending eMail - Cron is working
 
changing the "-o" to "-O" also worked for me. Now my forum email are being sent.
 
Average of ratings: -
Picture of Adam Sorensen
Re: Forum not sending eMail - Cron is working
 
under Notifications i saw something that said cron test has not run for 24 hrs. or something like that.
I clicked on it, ran test. All my email then showed up. Not sure if it was coincidental.
Now notification is gone so i cant tell you exactly what it said.


 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Forum not sending eMail - Cron is working
Group Particularly helpful MoodlersGroup Testers
Adam,
I'm 99% certain that "not run for 24 hours" essentially means the cron is not running on a regular basis. Your admin needs to follow the cron documentation to run the cron about every 10 minutes.
 
Average of ratings: -
Picture of Antonia Martinez
Re: Forum not sending eMail - Cron is working
 

THANKS! This solved my problem of my forum posts not sending email. And the instructions in the documentation for how to set the cron job were sooooo simple to follow. Hooray!

 
Average of ratings: -
Picture of Frank Muscara
Re: Forum not sending eMail - Cron is working
 
i was having the same problem and running the cron test worked for me. thanks.
 
Average of ratings: -
Picture of Fahmy Babjee
Re: Forum not sending eMail - Cron is working
 

Our Moodle installation is experiencing a similar problem.

Forums within courses are working perfectly and emails get sent out with no problems and cron executes correctly.

However whenever there's a new post on the Site News of the front page, cron hangs at processing user...

 
Average of ratings: -
Picture of Graeme Starke
Re: Forum not sending eMail - Cron is working
 

We have been getting similar problems with two sites - both the same moodle version (1.9.4) on the same server. We have had the server admin look at the chron and made adjustments (the capital -O instead of lower case) but still get the same result. Interestingly messages in the forums get sent to admin email accounts (external - two different admin accounts) but not to anyone else. Even when someone else posts the same thing happens - copies to admin accounts but not others (even the poster).

Is there some setting that could be causing this?

 
Average of ratings: -
Picture of Graeme Starke
Re: Forum not sending eMail - Cron is working
 

After much testing we have solved our problem with this.

If the user has a role defined for the system (Users, Define Roles) then they will receive emails, even if they are defined as guest. If the role definition is done at the forum level itself it doesn't work - only when defined at the system level.

Hope this helps someone else.

 
Average of ratings: -
Picture of Brendan Blowers
Additional information
 
Hey everyone,

I had the same problem as you all for several months. The final solution I came to was to edit the cron job (as is mentioned previously in this thread). Anyway, here are the details of how I got the cron job working. Hopefully this will be helpful to others:


Issue: Moodle doesn't send out e-mail notifications when people post to the forum.

Details:

  • When a person is "subscribed" to a Moodle forum, they are supposed to receive e-mails automatically when other people post to that forum. This setting can be enabled/disabled by navigating to the forum as a teacher or admin, clicking "Show/edit" current subscribers, and turning editing on.
  • However, sometimes the users will not receive e-mails even if they are subscribed and people post to the forum.
  • (Note, this error may occur even though the registration and password confirmation e-mails ARE being sent out!)

Solution:

It may be that the "cron" job is not executing properly. You have to set it up to execute various times per hour. This is especially important if you migrated or copied the moodle installation from another folder/website!:
  • If you have shell access and server control, you can add a cron job by doing the following:
    • # crontab -e
      Edit the file that is opened by adding this line and changing the path.
      */5 * * * * /usr/bin/php '/var/www/website3/moodle/admin/cron.php' > /dev/null
      Restart the cron daemon just for good measure
      # cd /etc/init.d
      # crond restart

    • (Note: here are some other examples you can use in place of the line beginning with */5 * * * * above)
  • If you are using a hosting service (such as Godaddy) and didn't install moodle through the application manager, you can set the cron settings in your hosting control panel:
    • Log in and go to "My Account->Hosting->Manage Account->Content (dropdown box)->Cron Manager"
    • From here you can create a cron job with the following command:
 
Average of ratings:Useful (1)
Picture of William Megill
Re: Additional information
 

Thanks for this! Finally explained what the problem is. Not that my ISP will let me fix it, but at least I know now why I can't!

I've come up with a workaround, which seems to solve the problem. Under the news forum link, I've created a URL resource, linking to

http://doesntexist.com/moodle/admin/cron.php

and not made it visible. Teachers can see the link, but students can't. So for the forums where it's one way communication, this solves the problem by adding two extra clicks to the news posting process. A bit of a bother, but for a small site, hopefully useful to someone.

 
Average of ratings: -
Picture of Gary Lebowitz
Re: Additional information
 

Hi, I saw your response a couple of years ago to this question and was wondering if you could help me with a GoDaddy command question. I have just installed Moodle 2.2.3 after upgrading to PHP 5.3, but using a command that worked just fine with I was using an older version of Moodle. That was: 

/web/cgi-bin/php5 "$HOME/html/moodle223a/admin/cli/cron.php"

The problem is that now I am using Moodle 2.2.3 and each time the cron job runs I get a message saying (erroneously, I checked to see what PHP version the system has) that I need to upgrade my PHP version to 5.3. I suspect there is something going on with the command I wrote, which must be updated to reflect the new installation. But I don't know how to do this. Any ideas you might agree to share on this? Regards

 

 
Average of ratings: -
Picture of Ruth Ruane
Re: Forum not sending eMail - Cron is working
 
Hi
I just wanted to share my solution to the cron working only manually with the result that but forum emails not being sent out automatically.
Emails stopped being sent out automatically without any setting changes being made.
One day things were fine and the next students weren't getting mails from the site.

There were no error messages when sending an internal message.
If I clicked forgot password that function worked ok as well.
The cron was checked and it seemed to be fine.
Every day I would have to manually run the cron and then mails would go out.
So today I went I logged into the server and I deleted the cron task.
Then I created a new but identical cron job.
Emails from forums and internal emails started sending automatically again.

I thought that it would be something that there would be no harm done it trying and it was very simple.

FYI here is how I did it.
I logged into my administration panel on my hosting server.
Then I found the place where the cron was set up.
I first copied the cron full url and pasted it in a notepad to keep it safe as it was a very long and complicated url.
Then I deleted the old cron task.
Then I created a new one and pasted in the old url and submitted the new cron task.

I hope I helped someone.
Regards,
Ruth
 
Average of ratings: -
Picture of P H
Re: Forum not sending eMail - Cron is working
 

Hello Ruth, 

I just wanted to thank you for helping solve a long-standing problem.

As advised by you, I deleted and recreated the cron instances and - Voila! - it all works like clockworks now! (Moodle 2.2.3)

Have a good morning/afternoon/evening! 

P. H. 

 
Average of ratings: -
Picture of jincy jose
Re: Forum not sending eMail - Cron is working
 

Hi,

I have the same problem with moodle 2.2.10.Mail is not sending to forum subscribers but mail is working for change password and sending message.As you told I tried to change the cron but there is no cron jobs in my hosting manager.What can i do?Can you help me?

 
Average of ratings: -
Picture of alireza kj
Re: Forum not sending eMail - Cron is working
 
Hi,
My problem is a little bit different. I could send messages to all students and when they are not online, they can get them via their emails. I mean the mail does work in this case. However, Nobody receive Forum posts via their emails. As I checked through my hosting server, it seems that Forum mail function does not work at all! But there is no errors.

Any suggestion would be appreciated.
Alireza.
 
Average of ratings: -
Picture of Ratnesh Mathur
Re: Forum not sending eMail - Cron is working
 
IN my case the users (students) are gettgn the forum emails -
but i (an admin) who is also enrolled into this course (as admin) is not getting it
- must be something to do with permissions - can somebody guide me
 
Average of ratings: -
Picture of Maorong Zou
Re: Forum not sending eMail - Cron is working
 
I installed the stock ubuntu lucid moodle package (version 1.9.4). Forum email does not work. I was able to track down the problem.

 PHP Fatal error: Call to undefined function html2text()
 /usr/share/moodl /lib/weblib.php on line 2274 

Replace the line
 $result = html2text($html);
with
 $test = new html2text();
 $result = $test->html2text($html);

fixes the forum email issue.




 
Average of ratings:Useful (1)
Picture of Nathan Gilmore
Re: Forum not sending eMail - Cron is working
 
Maorong Zou - Thank You!

I can confirm that this worked for me too. I'm on the same design, ubuntu 9.04 and installed moodle via apt-get so I'm on 1.9.4 too.

What is your new code doing to fix this?
 
Average of ratings: -
Picture of Sara Valla
Forum sending eMail only to one user - Cron is working
 

Thread is working on many years old, but the topic/subject is the same now…
I read all interventions and followed suggestion but no solution.
And Moodle release is not 1.9 but 2.2.2.

Now I upgraded to Moodle 2.2.2+ (Build: 20120323) so problem is on that release… since nothing has changed
Apache/2.2.3 (CentOS)
MySQL client: 5.5.15
PHP Version 5.3.10

I use both CAS and local authentication and it works correctly.

I've got a problem with forum notification email.
I'm not able to identify the beginning of the problem, actually… it seems to me that it started about on 9th February 2012, when I upgraded from 2.1 to 2.2 but I'm not completely sure.

Roles are defined at system level (not at forum level).
Users do not receive mails at post sending inside forums even if they ARE subscribed.

I tried both with compulsory subscription and non compulsory subscription forums since I read that sometimes with previous Moodle releases that could be the problem but they behave the same.

What happens?
A post is inserted in the forum
mail is sent - cron runs correctly
If I also run it manually it shows it:
"sending post n"
"processing user n"
"12 users were sent post 333" and so on

… but actually only (one of) my user(s) receives mails.
I'm user id 3 in db, that is the first CAS user inside db (user 1 is guest, user 2 is a local admin I created at first).

I already looked around inside forums and Moodle Tracker platform but I didn't find any solution.

I found http://moodle.org/mod/forum/discuss.php?d=141218
I verified and my problem is different from those signalled there and solutions are not suitable for my issue


I also found: http://tracker.moodle.org/browse/MDL-30698
and I thought: "That's it. It seems to me that I've got the same problems with email notifications from forum.
Cron runs correctly, shows user processing and indicates that "n users were sent post idnumber" but only one user receives email notification."

I therefore modified file ../mod/forum/lib.php as suggested, but I didn't solve the problem.

I looked for mail problems as suggested in a post but I get

Mar 25 14:38:25 colab sendmail[32722]: q2PCcOk4032722: to="Sara Valla" <sara.valla@studenti.unipr.it>, ctladdr=sara.valla@unipr.it (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=142372, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q2PCcO9b032723 Message accepted for delivery)
Mar 25 14:38:25 colab sendmail[32726]: q2PCcPZ4032726: Authentication-Warning: colab.cce.unipr.it: apache set sender to sara.valla@unipr.it using -f
Mar 25 14:38:25 colab sendmail[32726]: q2PCcPZ4032726: from=sara.valla@unipr.it, size=4362, class="-60", nrcpts=1, msgid=<moodlepost3453@colab.cce.unipr.it>, relay=apache@localhost
Mar 25 14:38:25 colab sendmail[32727]: q2PCcPbR032727: from=<sara.valla@unipr.it>, size=4557, class="-60", nrcpts=1, msgid=<moodlepost3453@colab.cce.unipr.it>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]

and it seems to me that it is ok...

I can't think of any other things to do and cannot solve the problem sad

Any further suggestions? Thanks in advance!

 
Average of ratings: -
Picture of Stefan Nychka
Re: Forum sending eMail only to one user - Cron is working
 

Hi.  Further diagnosis only

  • determine what's special about the one user that's receiving email.
  • Create a course with just 2 users, and play a bit ... ensure both profiles are correct, and emails are legit., and see what happens.

Can't remember where (a forum post in here), but some shots in the dark

  • on a user not receiving, disable, save, then re-enable (and save) their email.  See if that works.
  • Change the type of forum ... ensure just a standard forum works.

Some docs. that may be useful:

 
Average of ratings: -
Picture of Chris Liang-Vergara
Re: Forum sending eMail only to one user - Cron is working
 

Same problem here - created a new instance of 2.2.2, cron runs, personal messages get delivered, but nothing from forums or news feeds.  We're on Lunarpages.

 
Average of ratings: -
me
Re: Forum not sending eMail - Cron is working
 

Well, here I go adding to this immense thread. wink

A faculty member sent an email out of moodle, but it was not received for 44 hours.  The smtp server has no logs related to the time it was sent, but does have activity at the 44 hours later time that the message was received.  What might cause moodle not to communicate with the smtp server?  Note: the smtp server was receiving email from other senders during those times so there is no evidence that the smtp server was down in any way.

 
Average of ratings: -
Picture of Dr. Nellie Deutsch
Re: Forum not sending eMail - Cron is working
 

Moodle 2.2.2 version is driving me crazy. Cron is working just fine, but no one is getting email notifications when they post to the discussion forums. I know that other admins of Moodle are having issues with this, too. Has anyone been able to resolve it?

 
Average of ratings: -
Picture of Nicolas lamoureux
Re: Forum not sending eMail - Cron is working
 

same bug here. please keep me inform !

 
Average of ratings: -
Picture of Trevor Wilson
Re: Forum not sending eMail - Cron is working
 

Similar problem here.


Direct message works... course news forum works.... site news forums doesn't send mail (other than to me).

 
Average of ratings: -
Picture of João Filipe Oliveira
Re: Forum not sending eMail - Cron is working
 

The same with 2.3

 
Average of ratings: -
Picture of Fabricio Braz
Re: Forum not sending eMail - Cron is working
 

Same problem! Has anyone solved it?

 
Average of ratings: -
Picture of panagiotis karageorgos
Re: Forum not sending eMail - Cron is working
 

I tried the solution described above by by Brendan Blowers

Cron is running in a programmar every 1 hour, and i m getting my emails  but they are characterized as SPAM.

As i can see there is another php script that sends automatically emails from forums or news and another for email messages.

I believe that someone some changes could be made there. 

 
Average of ratings: -
Picture of Richard Oelmann
Re: Forum not sending eMail - Cron is working
Group Particularly helpful MoodlersGroup Testers

Characterising an email as spam is usually done at the receiving end, not where they are sent from. Check your own email settings and try adding the moodle address you are receiving them from (the spam ones) to your trusted receivers list

 
Average of ratings: -
Picture of Marlon Demos
Re: Forum not sending eMail - Cron is working
 

hello moodlers,

i'm stuck . I 've read a lot of things about thid problem but it doesn't work out.

My first issue is (and actual) on a Moodle 2.2.2+ (Build: 20120315) installation an hosted platform. 

Problem is users are not receiving mail. In the beginning admin-account received mail but at this moment nothing. I configured gmail as smtp and also edit the portnumber. But still no mail.

For now (because maybe i edited to much) i did an fresh installation from cpanel . Still no mail. Only mail was sent if the admin e.g. sent the user/studentaccount an private message. This is a  default installation.

Please, can someone help me with this? It is been over a few weeks i tried to resolve this with reading and editing but now i'm stucked

I tried de gmail smtp

Still errors, see the attachment.

 

If u need more information i can add this a.s.a.p. 

 

greetings

Marlon

 
Average of ratings: -
Picture of Christian Chapi
Re: Forum not sending eMail - Cron is working
 

Try this:

If a new forum post is written, every subscriber gets an e-mail. If more than one person has subscribed to the forum, only one of all e-mails arrive. The problem was, that the mailserver identified them as "duplicate" because of the same "message-ID". So only the first mail was delivered. Looking into the code, this was clear....:

../mod/forum/lib.php line 602 (v2.1.2): 'Message-ID: <moodlepost'.$post->id.'@'.$hostname.'>',

The message-ID consists of the "post-ID"...
To have individual message-IDs, I just put the "userto-ID" into it as well: 'Message-ID: <moodlepost'.$post->id.$userto->id.'@'.$hostname.'>',

Now it works, every subscriber gets an e-mail.

I wonder if the behaviour of our mailserver is normal, but maybe this hint can help others too...

 
Average of ratings: -
Picture of Gerrard Shaw
Re: Forum not sending eMail - Cron is working
 

I'm having the same problem, seems like the cron job only makes one request to send the mail - I'm watching my postfix /var/maillog file with tail and only see the first address appear (yet bizarrely it sends to multiple users on my test server)

The other site won't send forum messages at all despite saying in the cron it has, both servers were set up at the same time using the same OS version and Moodle configuration. 

Other emails send perfectly via the SMTP relay defined in postfix (cron job output etc) so getting to the point of wondering if it's something in the Moodle code being odd.

Also does this still apply? (found in another thread)

Moodle sends mail in two ways. If you do not specify an smtp server then it will use PHP's built in mailer. This just calls 'sendmail' on the server (which obviously needs to exist and be set up correctly). That either works or it doesn't (it's not a Moodle issue).

If you specify an smtp server it will use a mail library called 'phpmailer'. This simply initiates a conversation with your specified smtp server and relays all the mail there - anticipating that it will deal with it appropriately. This is usually the better choice and the only choice on Windows servers that do not have sendmail. Not *all* mail is sent from the cron job but, yes, most is.

I'm not really sure your question about mail being sent from the same server makes any sense. Mail is sent by code in Moodle so that's where it starts out. A send request is initiated by something in Moodle initiating the (Moodle) API calls that send mail. There's no magic.

 
Average of ratings: -
Picture of Julia Küfner
Re: Forum not sending eMail - Cron is working - Forum hidden
 

I had a similar problem and found this post. It has probably nothing to do with the former posts but perhaps it is helpful for some people:A teacher had reported that his last forum entry was only received by one coursemember. It turned out that someone had accidentally hidden the forum. Therefore the message was only send to course members who had the right to view it. He was quite angry as moodle did not give him any hint that the forum was hidden and that not everyone will receive the message. I therefore proposed a change of the feedback text the teacher gets https://tracker.moodle.org/browse/MDL-43686 .

It was helpful to me to manually start cron via url. I waited about 30 minutes after the post and then startet cron manually. Receiving the following:

Processing module function forum_cron ...Processing user 11582
user 11582 can not see 2954
Processing user 6908
Sending post 2954: testnachricht
1 users were sent post 2954, 'testnachricht'
Starting digest processing...
Cleaned old digest records
... used 42 dbqueries
... used 0.130863904953 seconds
done.

Then it was obvious that the problem was within moodle configuration. The function that checks whether a user may see a message is:

mod/forum/lib.php forum_user_can_see_post

 
Average of ratings: -
Picture of Richard Oelmann
Re: Forum not sending eMail - Cron is working - Forum hidden
Group Particularly helpful MoodlersGroup Testers

'He was quite angry as moodle did not give him any hint that the forum was hidden'

 


 
Average of ratings: -
Picture of Julia Küfner
Re: Forum not sending eMail - Cron is working - Forum hidden
 

No sorry I mean the feedback text you receive. ( Your post was successfully added. You have 30 mins to edit it if you want to make any changes.(Continue))

I was actually surprised that forums still send emails when they are hidden.  But it is of course helpful for those using it to communicate just between teachers.

I think you can't expect from an ordinary teacher to understand the concept of hidden forums sending emails only to special users. Further more, you don't get any hint that the forum is hidden inside the forum and the feedback message gives you the feeling that everything is fine. And teachers don't get any further feedback or logfile where they could check if emails were actually send. Therefore I think from a usability point of view a short info in the already existing feedback text should be included to point out that the current forum state does not work behave like a standard forum.

 
Average of ratings: -
Its Me
Re: Forum not sending eMail - Cron is working
 

I know that this is an old, old, old thread, but the title explains my problem exactly (well almost)

Settings:

Moodle 2.5 (it was upgraded from 1.9)

Cron is set to run every 5 minutes and is set to wget -q -O /dev/null and http://www.moodelsite.org/admin/cron.php

Forums are set to alert everyone when a new post or reply is added

Emails are sent from Moodle SMTP settings using http://mandrill.com/ (a mail sending and tracking site for free)

If you reset your password, do another action that makes the site send you an email, the site sends you an email

Problem:

When someone creates a new forum/news post it generally (more than 70% of the time) sends out the email to all subscribers notifying them of the new post, but, if someone replies, no one is notified most of the time (I have done tests before, but would estimate this at less than 10% of the time)

I have done some tests today from a test forum, and it does not send out any emails, even when I manually run the cron script? (over and over again)

Past fix to a similar problem:

After updating from 1.9, no emails went out at all from any forum or news post (but they did from reset password), and I found that the user level (e.g. student, etutor) were not replicated into the forums, so although the forum shows how many subscribers you had, they were not subscribed because they don't have a role within the forums. So I needed to re add all users to the forum and this (sort of) fixed it, but now we are using the site more, we are seeing that not all messages are being sent.

Has anyone got any other ideas on how to resolve this?

 

 
Average of ratings: -
Its Me
Re: Forum not sending eMail - Cron is working
 

I have found the solution.

In this case, I had increased the server security due to a high number of attacks. Two tweeks I made were to modify SMTP Restrictions and preventing "nobody" from sending mail.

I also found that some of the forums did not have any subscribers, so now everyone is subscribed, and the restrictions modified, its all working well.

You can find if any ports are blocked on your site using the cmd or terminal and use

telnet yourmoodlesite.com 25

Change yourmoodlesite.com for your domain and change port 25 for other ports, e.g. 587 or 465 if your using ssl.

Or, use this site as it will scan your site for you - https://pentest-tools.com/discovery-probing/tcp-port-scanner-online-nmap

Good Luck. big grin

 
Average of ratings: -