From 57ef3480400d78108003f46ce08a99fdb9d20440 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 28 Oct 2003 14:35:00 +0000 Subject: [PATCH] If debugging is on, then make SMTP print debugging info --- lib/moodlelib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0eaccf2e2a7..fd37fb402da 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