]> git.mjollnir.org Git - moodle.git/commitdiff
If debugging is on, then make SMTP print debugging info
authormoodler <moodler>
Tue, 28 Oct 2003 14:35:00 +0000 (14:35 +0000)
committermoodler <moodler>
Tue, 28 Oct 2003 14:35:00 +0000 (14:35 +0000)
lib/moodlelib.php

index 0eaccf2e2a75e0a87e0cfdc2b7c4e3585750fa46..fd37fb402da1546b2204596d9fc613abbf8b92c7 100644 (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