No emails is sending from Moodle after an upgrade

No emails is sending from Moodle after an upgrade

by mesh sporg -
Number of replies: 4

Hey guys, Could anyone please help me with this issue ?

We upgraded our Moodle from 2.8.5+ to 2.8.7+ and everything works fine but the mailing service. We use Moodle PHP server for emails (Not SMTP) and now no emails is sending from Moodle. (Confirmation emails, emails from forums ...)

It really made me confused as I've tested whatever solution I found on the net. Please help me with any ideas you might have. Appreciate your kind responses in advance.

 M. Sporg

Average of ratings: -
In reply to mesh sporg

Re: No emails is sending from Moodle after an upgrade

by mesh sporg -

The error I get when trying to register as a new user is :

" Tried to send you an email but failed!

Debug info:
Error code: auth_emailnoemail
Stack trace:
  • line 463 of \lib\setuplib.php: moodle_exception thrown
  • line 106 of \auth\email\auth.php: call to print_error()
  • line 86 of \login\signup.php: call to auth_plugin_email->user_signup() "


and in logs (reports) it says :

"Failed to send an email from the user with id '-20' to the user with id '10082' due to the following error: "Could not instantiate mail function.". "



In reply to mesh sporg

Re: No emails is sending from Moodle after an upgrade

by Developer@ Monarch Media, Inc. -

Hi,

Please try the php mail() function using sample mail sending script and confirm whether it is working or not. If not, please verify the mail process is working or not.

In reply to mesh sporg

Re: No emails is sending from Moodle after an upgrade

by Dabir Bhatti -


Did you solve this? I am getting exactly the same error message when a user creates a new account. I am using Moodle 2.7 on a Linnux server, and I upgraded from 2.6 but in my case I have never been able to send emails - even though I have double checked the email settings. Tried Google as well as 1and1 email settings.

 

Can anyone help please, because this doing my head in and I have searched on Moodle where many people have the similar problems, but no solutions.

PhpMailer from version 2.4.8 has been mentioned in the forums - I will try that out.

In reply to Dabir Bhatti

Re: No emails is sending from Moodle after an upgrade

by Ron Meske -
Picture of Particularly helpful Moodlers

Hello Dabir,

I recently updated a site from 2.5 to 2.7 and the email stopped working.  It ended up the Support email field was blank and defaulting to an email address that was different then the email account being used to send emails.  Once I set the support email address to match, email worked again.

Hope that helps.

Ron