Hi, The patch attached in the previous message is not correct. I've improved it and attached it again.
Thanks for your work!
--- moodlelib.php.ori 2010-08-24 21:25:20.000000000 +0200
+++ moodlelib.php 2011-01-28 22:07:35.000000000 +0100
@@ -4275,9 +4275,15 @@
if (is_string($from)) { // So we can pass whatever we want if there is need
$mail->From = $CFG->noreplyaddress;
$mail->FromName = $from;
+ // Set Reply-To header. Some mail servers override email address of From: header.
+ // Setting Reply-To header we avoid that user replies to the overriden address
+ $mail->AddReplyTo($CFG->noreplyaddress, fullname($from) );
} else if ($usetrueaddress and $from->maildisplay) {
$mail->From = stripslashes($from->email);
$mail->FromName = fullname($from);
+ // Set Reply-To header. Some mail servers override email address of From: header.
+ // Setting Reply-To header we avoid that user replies to the overriden address
+ $mail->AddReplyTo(stripslashes($from->email), fullname($from));
} else {
$mail->From = $CFG->noreplyaddress;
$mail->FromName = fullname($from);
signature.asc
Description: This is a digitally signed message part

