如何在Moodle的消息中更改发件人地址(noreply @ localhost)?
I'm working on my first Moodle system and have got most things working the way I want but I'm stuck on one thing for which I can't seem to find the answer by googling around.
When I send out a message to participants on a course, the from address of the email is noreply@localhost. I want to change this address to something else but can't figure out where I need to do this. Does anyone know how I can change this?
Thanks in advance Ziad
我正在研究我的第一个Moodle系统并且大部分工作都按照我想要的方式工作但是我被卡住了 关于我无法通过Google搜索找到答案的一件事。 p>
当我向课程参与者发送信息时,电子邮件的发件人地址是noreply @ 本地主机。 我想将此地址更改为其他内容,但无法确定我需要执行此操作的位置。 有谁知道我怎么能改变这个? p>
提前致谢 Ziad p> div>
Log in as a system administrator and go to [your moodle root]/admin/settings.php?section=mail and then update the "No reply address" - I think that's all you need!
In case the from
or the noreplyaddress
has to be changed on the fly (while still leaving the default settings in tact), the following can be done:
1) in the $from
(which happens to be an stdClass()
object), the value of $from->maildisplay
can be set to the desired address
2) while calling the email_to_user()
, the 8th parameter should be set to true
.
As a result, the email_to_user()
will take care to display the value set in step 1 above in the sent mail.
FYI - The email_to_user()
function is available at [your-moodle-root]/lib/moodlelib.php