我已经使用了大约26个小时,并且无法通过我的Moodle服务器向自行注册的用户帐户发送电子邮件。
我试过了:
但Moodle拒绝发送电子邮件。
以下是Apache服务器中的错误日志消息:
[Tue Jul 16 13:08:21 2013] [error] [client ip]默认异常处理程序:检测到不支持的重定向,脚本执行终止调试:\ r \ n错误代码:redirecterrordetected \ n * 2443 of \ lib \ weblib.php:moodle_exception抛出\ n * \ lib \ moodlelib.php的第2940行:调用\ repository \ draftfiles_ajax.php的redirect()\ n *第34行:调用require_login()\ n,referer:edit.php
[Tue Jul 16 13:08:22 2013] [error] [client 127.0.0.1]文件不存在:C:/ Program Files(x86)/ Moodle / server / moodle / moodle
同时点击“更新个人资料”'按钮,带有评论的空白屏幕' 无法发送电子邮件!'被展示。在检查edit.php时,我找到了以下代码:
if ($email_changed && $CFG->emailchangeconfirmation) {
$temp_user = fullclone($user);
$temp_user->email = $usernew->preference_newemail;
$a = new stdClass();
$a->url = $CFG->wwwroot . '/user/emailupdate.php?key=' . $usernew- >preference_newemailkey . '&id=' . $user->id;
$a->site = format_string($SITE->fullname, true, array('context' => context_course::instance(SITEID)));
$a->fullname = fullname($user, true);
$emailupdatemessage = get_string('emailupdatemessage', 'auth', $a);
$emailupdatetitle = get_string('emailupdatetitle', 'auth', $a);
//email confirmation directly rather than using messaging so they will definitely get an email
$supportuser = generate_email_supportuser();
if (!$mail_results = email_to_user($temp_user,
$supportuser, $emailupdatetitle, $emailupdatemessage)) {
die("could not send email!");
}
}