mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Tiny hack for Qmail - I've come across one system which REQUIRED the IsQmail
method of phpmailer to be used. This is now possible just by specifying "qmail" in the smtphosts field.
This commit is contained in:
parent
0b4c582298
commit
627407365c
@ -883,7 +883,13 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $a
|
||||
$mail->CharSet = get_string("thischarset");
|
||||
}
|
||||
|
||||
if ($CFG->smtphosts) {
|
||||
if ($CFG->smtphosts == "qmail") {
|
||||
$mail->IsQmail(); // use Qmail system
|
||||
|
||||
} else if (empty($CFG->smtphosts)) {
|
||||
$mail->IsMail(); // use PHP mail() = sendmail
|
||||
|
||||
} else {
|
||||
$mail->IsSMTP(); // use SMTP directly
|
||||
if ($CFG->debug > 7) {
|
||||
echo "<pre>\n";
|
||||
@ -896,8 +902,6 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $a
|
||||
$mail->Username = $CFG->smtpuser;
|
||||
$mail->Password = $CFG->smtppass;
|
||||
}
|
||||
} else {
|
||||
$mail->IsMail(); // use PHP mail() = sendmail
|
||||
}
|
||||
|
||||
$adminuser = get_admin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user