如何在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

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