Email not sending after upgrade to Moodle 2.7.13

Email not sending after upgrade to Moodle 2.7.13

by Ron Meske -
Number of replies: 2
Picture of Particularly helpful Moodlers

Hello,

We just recently updated our Moodle 2.5.6 site to Moodle 2.7.13.  Everything seems to be working except email sending.  Prior to the upgrade emails were being sent without issue through an Office 365 account.  Now we get an error on the forgot password page.  With messaging turned off and sending an email to a participant in course does not generate an error on screen or in the apache error log.  As it is a cron service is there a different log to check?

With email debugging turned on and attempting to send a forgot password email, the debug messages all seem to indicate that it is working and authenticating.

The last two lines prior to the page display are:

SMTP -> get_lines(): $data was ""SMTP -> get_lines(): $str is "235 2.7.0 Authentication successful target host SN2PR10MB0110.namprd10.prod.outlook.com
"SMTP -> get_lines(): $data is "235 2.7.0 Authentication successful target host SN2PR10MB0110.namprd10.prod.outlook.com


On the page display we receive the error: Error sending password change confirmation email

Then after the page the following lines are displayed:

SMTP -> get_lines(): $data was ""SMTP -> get_lines(): $str is "221 2.0.0 Service closing transmission channel
"SMTP -> get_lines(): $data is "221 2.0.0 Service closing transmission channel
"SMTP -> FROM SERVER:221 2.0.0 Service closing transmission channel


The error in the apache error log is:

[Thu Apr 07 19:16:34.054287 2016] [:error] [pid 10659] [client *.*.*.*:32198] Default exception handler: Error sending password change confirmation email Debug: \n
Error code: cannotmailconfirm\n* line 463 of /lib/setuplib.php: moodle_exception thrown\n* line 110 of /login/lib.php:
call to print_error()\n* line 65 of /login/forgot_password.php: call to core_login_process_password_reset_request()\n,
referer: https://mydomain.com/login/forgot_password.php


Any ideas where to look for the source of the error.

Average of ratings: -
In reply to Ron Meske

Re: Email not sending after upgrade to Moodle 2.7.13

by Ron Meske -
Picture of Particularly helpful Moodlers

Hello,

I have tried re-entering all email information and am still not able to send mail.  Any suggestions where to look as to what may be causing the issue?  Only the version of Moodle changed.  

Could there be something in the config.php file impacting this?

Regards,

Ron

In reply to Ron Meske

Re: Email not sending after upgrade to Moodle 2.7.13

by Ron Meske -
Picture of Particularly helpful Moodlers

Hello,

Though the fix does not make sense, I have found the issue.  The email address for the support contact was blank and by default was using a different email then the sending account.  I set the email address to the same address used for the sending account. Emails are now being sent again.

My questions:

  • Why does the support email address need to match the sending email address?  In my case, the sending account is an unmonitored account used by our online applications for sending emails.
  • As this was previously working, was this requirement something new in 2.7?
  • Is this a requirement in version 3.x?


Best regards,

Ron