HI

We currently have three Moodle 2.0 (build 20110209) installations and receive the 'SMTP Error:Could not authenticate' and none of the subscribed users receive an email when a forum post is sent from these installations.  I, as an admin, recieve the following message within an email:

Insert into log table failed at Wednesday 16th of February 2011 11:57:28 AM.

 It is possible that your disk is full.

The failed query parameters are:

array (

  'time' => 1297857448,

  'userid' => '2',

  'course' => '1',

  'ip' => '10.10.10.14',

  'module' => 'library',

  'cmid' => 0,

  'action' => 'mailer',

  'url' => NULL,

  'info' => 'ERROR: SMTP Error: Could not authenticate.',

)

When I look at the cron log, it has the following message:

<br />SMTP Error: Could not authenticate.
ERROR: SMTP Error: Could not authenticate.
++ Error: Could not insert a new entry to the Moodle log ++
* line 1691 of /lib/datalib.php: call to debugging()
* line 4742 of /lib/moodlelib.php: call to add_to_log()
* line 63 of /message/output/email/message_output_email.php: call to email_to_user()
* line 152 of /lib/messagelib.php: call to message_output_email->send_message()
* line 644 of /mod/forum/lib.php: call to message_send()
* line 87 of /lib/cronlib.php: call to forum_cron()
* line 79 of /admin/cron.php: call to cron_run()
</pre>++ Error calling message processor email ++
* line 153 of /lib/messagelib.php: call to debugging()
* line 644 of /mod/forum/lib.php: call to message_send()
* line 87 of /lib/cronlib.php: call to forum_cron()
* line 79 of /admin/cron.php: call to cron_run()
Error: mod/forum/lib.php forum_cron(): Could not send out mail for id 36 to user 28 (blahblah@somemailco.co.uk) .. not trying again.
post 36: another test
0 users were sent post 36, 'another test'

 

We have Moodle v 1.9 on the same server with the exact same SMTP settings and this install is sending emails accordingly.

Ali

-----------------------------------------------------------------------------

Hi, I just solved my problem and want to share the solution with you.

 

It was a line addition to moodlelib.php  ( in the lib directory)

Find the line :

$mailer->IsSMTP();

and under this line , insert

$mailer->SMTPSecure = "tls";

if you use TLS of course. After this, e-mail system was working without any problems.

I hope it helps. smile

posted on 2011-10-26 20:12  敌敌  阅读(7778)  评论(0)    收藏  举报