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:
moodler 2003-11-28 10:57:58 +00:00
parent 0b4c582298
commit 627407365c

View File

@ -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();