From: moodler Date: Tue, 28 Oct 2003 14:35:00 +0000 (+0000) Subject: If debugging is on, then make SMTP print debugging info X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=57ef3480400d78108003f46ce08a99fdb9d20440;p=moodle.git If debugging is on, then make SMTP print debugging info --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0eaccf2e2a..fd37fb402d 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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 "
\n";
+            $mail->SMTPDebug = true;
+        }
         $mail->Host = "$CFG->smtphosts";               // specify main and backup servers
 
         if ($CFG->smtpuser) {                          // Use SMTP authentication