If debugging is on, then make SMTP print debugging info

This commit is contained in:
moodler 2003-10-28 14:35:00 +00:00
parent c260b07707
commit 57ef348040

View File

@ -869,6 +869,10 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $a
if ($CFG->smtphosts) {
$mail->IsSMTP(); // use SMTP directly
if ($CFG->debug > 7) {
echo "<pre>\n";
$mail->SMTPDebug = true;
}
$mail->Host = "$CFG->smtphosts"; // specify main and backup servers
if ($CFG->smtpuser) { // Use SMTP authentication